I have a ‘meetings’ prototype that contains a boolean called $Actions
‘meetings’ has the following onAdd action that isn’t working as intended ( If $Actions in meetings is true I want any children created to be of tasks prototype and if false to be of agenda item prototype
I’ve tried combos of If($Actions){…} and if(!$Actions){…} etc but to no avail - The boolean state test seems to be ignored - not crucial but I thought it was going to be a fairly easy test
Code in on OnAdd runs on the (new) child note. Thus:
if($Actions==true)
Is testing the new child’s $Actions value. But your intent is to check the $Actions for the container note, i.e. the parent of the new child. Which means you want to test if($Actions(parent)==true).
So broken out with line breaks to show the branching:
The OnAdd action is run when the note is created, or when it is moved into the container. So, if you make a note and then set $Actions to true, the OnAdd will already have run.