I need to calculate the name of a new leaf under a parent node and assign the next sequential integer to the end of the node name based on the existing max under the selected parent.
For example, there are 3 nodes under "ABC_PARENTNODE". The names are:
ABC_Node1
ABC_Node2
ABC_Node3
I want to calculate the new node created in the workflow task to be "ABC_Node4".
I believe the Javascript needs to identify the parent selected in the workflow task and identify the max of the array beneath the parent and add one to that.
The nodes already have assigned sort order values so my thought was to use the Core.SortOrder property to add to the concatenation of the calculated name.
I have limited Javascript experience so this is a challenge to build without help.