Calculating a node name as the parent + an integer that adds 1 everytime a new child is added — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Calculating a node name as the parent + an integer that adds 1 everytime a new child is added

Summary:

I'm trying to calcualte the node name as the parent node name contactactened with a string and an integer that adds 1 everytime a new child is added.

For example, if the parent is called, ABC-XYZ, underneath the parent I would like the child names to be calcualted as follows-

ABC-XYZ- Child1

ABC-XYZ-Child2

ABC-XYZ-Child3

I have tried the following expression however this is not working correctly, as every child is having value as, ABC-XYZ- Child1

{
return node.parent.name.concat("-Child", node.siblings.max(siblingNode => siblingNode.name).name.toInteger.add(1).toString)
}

Is there an alternative way I can amend the expression to get the required results?

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!