I absolutely love this. I’m going to use this when copying contact notes from one file to another. This will be a quick way to update multiple notes at once through and agent and two different containers.
If things go wrong, you can store command in $MyString, or use show(command) to check it. The intermediate variable also gives you an opportunity to label what you’re doing, if the reader doesn’t see it right away.
That command-based approach is what used in the code added to Constructing $Attribute references in loops, but mention of show() as a means of checking the command is neat and I have added these to the article Constructing $Attribute references in loops with a new section at the end on testing. It has code examples using show() and logging by writing to the $Text of a log note.