Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DRG Add Leaf Workflow Task: How can I leverage Javascript to identify the max sort order?

User_EV2CKJan 9 2023 — edited Jan 9 2023

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.

Comments