A recursing function using no user attributes. Start at the top, then name all children and so on down.
Code
function fSectionName(iNote, iSectionValue){
$Section(iNote) = iSectionValue;
var:string vName = iSectionValue;
if (vName != ""){
vName = vName + ":";
};
$Path(children(iNote)).each(aNote){
fSectionName(aNote, (vName+$SiblingOrder(aNote)));
};
};
Logic
- If the top, section value is already known.
- Then, tell each child:
- This is your name.
- Now name your own children
Pros and Cons
- GOOD:
- Parent may know best how to name its children
- BAD:
- Then again, maybe not.