Tinderbox Forum

Setting Attribut Values for Children Notes

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”

@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.

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

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