Ah, I missed the single quotes in the rule-setting code. Do you have a small test doc that replicates the issue (and includes a note with $Text describing the problem)? It would make it easier to de-bug the issue.
In this line:
are you wanting the $Rule of note X to be set to this code, containing two discrete actionx:
Or, split out for clarity:
Separately, I’m confused as to the use of a rule here. You only need to to this task once. an edict would be a far less intrusive approach.
I’m also unclear as to the use of the ‘executedRule’ in a list. If you are wanting to make the rule as run then a boolean would make more sense, e.g. $MyBoolean. But, i’d not worry over adding user attributes, they are far less intrusive to the general doc than running unnecessary rules.
Assuming for a moment (pending a test doc) that your code works a better approach would be:
So now each note X gets the $Edict (again split out into linres for clarity):
Once set the edict runs the
linkTo() command and sets that note’s
true (i.e. ‘ticked’ when seen in Displayed Attributes an other parts of the UI). On second running of the edict, no action occurs as
MyBoolean, having been set, no longer evaluates as
false and so the code inside the
if conditional is not run.