Access attribute with computed name

I would like to access an attribute in a different note. The path to this note is (/myNoteA).
There is a second note named “myNoteB”. I would like to set the value of an attribute in myNoteB with the value of an attribute of myNoteA.

This action code does the job: $valueNoteB=$valueNoteA(/myNoteA);

But I want to use the name of the 2nd note to retrieve an attribute in myNoteA with the same name as the name of the 2nd note. Something like $valueNoteB=$($Name(/myNoteA))(/myNoteA);

Sounds confusing - sorry - if someone understand what I try to do - any hint would help.

A method like getValue(attributeName,nodePath) is what I need - where attributeName will be defined at runtime. I just dig into action code and try to understand the concept. Sorry for the chaos :wink:

got it:

action("$valueNoteB=$"+$Name+"(/pPreferences);")

1 Like