Gernot
(Gernot Weise)
April 15, 2021, 9:00am
1
I am changing values for some attributes by selecting one or more notes under the same parent note.
$Gist=$Text(parent).split(“\n”).at($SiblingOrder-1);$Gist2=$Gist.split(" - “).at(1);$Gist=$Gist.split(” - ").at(0);
This works fine.
Now, I want to apply a different strategy to avoid selecting every time the children notes.
Can I reference from the parent note all children notes and set for each children different attribute values? There are always 4 children notes.
I am thinking something like…
PseudoCode:
$MyString(Children/$SiblingOrder=1)=$MyString+“lorumlarumipsum”
satikusala
(Michael Becker)
April 15, 2021, 12:15pm
2
@Gernot , let’s discuss this on our call later today. I think a .each(x) method may be a more effective approach. I’ll be able to give you better advice, however, one I see the actual job to be done.
mwra
(Mark Anderson)
April 15, 2021, 1:28pm
3
For the left, you want to set the child whose $SiblingOrder is 1? If so, MyString(Children/$SiblingOrder=1)
won’t work. I think you mean, not tested:
$MyString(child[0])
Note that the child[N] designator is zero-based. (Tested in v8.9.2)
1 Like
Gernot
(Gernot Weise)
April 15, 2021, 5:46pm
4
mwra:
For the left, you want to set the child whose $SiblingOrder is 1? If so, MyString(Children/$SiblingOrder=1)
won’t work. I think you mean, not tested:
Thanks @mwra , just wanted to reference one of the childs and used this as an example. child[0] works fine for my purpose.
2 Likes