Sorry if I’m missing something, but I don’t see what collect adds here. Is there any reason why you wouldn’t simply use an agent to collect the notes:
(descendedFrom(/Test) | $Name=="Test") & $CMFlowName.icontains("verifiation")
and the use the AgentAction
In fact, even simpler than that — presumably you don’t want “verifiation” anywhere in the project at all, ever. So why not just search for it and replace it wherever it’s found in CMFlowName, no matter which note it is.
E.g with an agent searching for $CMFlowNote.icontains(“verifiation”) or by highlighting every note in the project and using the stamp
Strictly speaking, you don’t even need the if statement as the attribute won’t be changed if verifiation isn’t there to be replaced anyway.
Does that work, or am I missing something?