dvargas92495 / SmartBlocks

Useful examples from developer community for Roam42 SmartBlocks
147 stars 7 forks source link

<%CURRENTBLOCKREF%> returns the block reference for the block above the current block #146

Open eatondpe opened 3 years ago

eatondpe commented 3 years ago

🐞 Describe the behavior of the bug/issue you are encountering

<%CURRENTBLOCKREF%> returns the block reference for the block above the current block.

This began yesterday, Dec 20, when my using my Daily Notes SmartBlock. Looking at the three blocks below, <%CURRENTBLOCKREF%> should have copied the block reference of the Weight:: block onto the clipboard, so that <%CLIPBOARDPASTETEXT%> would paste it into the BMI calculation. But as of yesterday, it is the block reference of the Sleep:: block that is pasted into the BMI calculation.

💻 Environment

Platform: Windows

Browser: Brave

✔️ Describe what you think the Expected Behavior should be

📜 Steps to reproduce the issue you are having

  1. Create a SmartBlock with the following three blocks:
    • Sleep:: <%CURSOR%>
    • Weight::<%CLIPBOARDCOPY:<%CURRENTBLOCKREF%>%>
    • BMI:: {{[[calc]]: ((<%CLIPBOARDPASTETEXT%>*703/(67*67)))}}
  2. Run the SmartBlock.
  3. Compare the block reference in the calculation in the the BMI:: block with the block reference of the Sleep:: and Weight:: blocks.

🔨 Describe any workarounds you've created/discovered

None, other than manually capturing the block reference of the Weight:: block and replacing the block reference in the calculation with that value.

📷 Additional Info (Errors, Screenshots, GIFs, etc.)

image