Open eatondpe opened 3 years ago
# Reset Attribute #42SmartBlock
<%J:```javascript let blockID = document.querySelector("textarea.rm-block-input").id; let UID = '((' + blockID.substring( blockID.length -9) + '))'; roam42.smartBlocks.activeWorkflow.vars["blockRef"] = UID; return '';```%> <%NOBLOCKOUTPUT%>
<%SET:attributeString,<%RESOLVEBLOCKREF:<%GET:blockRef%>%>%> <%NOBLOCKOUTPUT%>
<%J:```javascript var attrString = roam42.smartBlocks.activeWorkflow.vars["attributeString"]; var attrValPair = attrString.split("::"); var attrValue = attrValPair.pop().trim(); var attrString = attrValPair.toString().trim(); roam42.smartBlocks.activeWorkflow.vars["attributeString"] = attrString; return "";```%> <%NOBLOCKOUTPUT%>
<%J:```javascript document.activeElement.value = ''; return '';```%> <%NOBLOCKOUTPUT%>
<%CONCAT:<%GET:attributeString%>,:,: %>
Removes the value part of the Attribute:: value pair in a block.
value
Attribute:: value
None
✂️ Copy of your #42SmartBlock from Roam
📋 Describe the SmartBlock
Removes the
value
part of theAttribute:: value
pair in a block.✅ Describe any prerequisites or dependencies that are required for this SmartBlock
None
📷 Screenshot of your #42SmartBlock workflow/template from Roam
💡 Additional Info