If Else Notes Functionality

Hi - I haven't fully thought this through but it would be awesome to have the "note" functionality be dependent on other variables. Currently I have the text show up and then I have a button which says "insert this text? No/Yes" and then when I select Yes - then I have the same text pop up, just outside of a note (to be inserted and able to be sent to client)

It would be awesome to somehow designate if that text should be within a note or not without having to duplicate the text within the snippet, again I haven't though too far into this, and I'm sure there is a technical/logical error reason it can't be done, but just wanted to mention

Thank you

Hi @ajduna7

At the moment, this isn't possible to implement directly - because the insert and preview attributes on the {note} command must be static.

However, here's one indirect way to achieve your request:

{if: insert_the_text}
  {import: /innersnippet}
{else}
  {note}{import: /innersnippet}{endnote}
{endif}

I have moved the contents of the {note} to a separate snippet (/innersnippet), and importing them into the main snippet. Then, I am putting the inner snippet inside the {note} after checking the relevant condition.

1 Like

That is an interesting way to solve this- Thank you for responding :slight_smile: