RITM work notes should updated with previous and current values of List Collector field.

Suresh_32
Tera Expert

I have a List Collector catalog variable for Secondary Manager, RITM work notes should updated with the previous and current values when we are trying to add/update/delete the list collector values in catalog form.

Work notes should be the below format :

The Secondary Manager is changed from previous value to current value.

Now it is displaying as expected, but loop is not break and it should print only one time. Please help me on this.

 

Please find the below script in flow designer and find the screen shot for ritm work notes.


var secMgrCurVal = fd_data.trigger.request_item.variables.secondary_group_manager_soeid.getDisplayValue();
var secMgrPreVal = fd_data.flow_var.group_secondary_manager; 
var newNames = secMgrCurVal.split(',');
  var oldNames = secMgrPreVal.split(',');    
    for (var j = 0; j < newNames.length; j++) {       
        for(var i=0; i < oldNames.length; i++){                  
               if (newNames[j].indexOf(oldNames[i]) !== -1) {         
           
                  }
             else{           
                         workNotes +='\nThe Secondary Manager is changed from '+secMgrPreVal+ ' to '  +secMgrCurVal;
                         break;
                   }
         }     
   
    }
 
 
 
Suresh_32_0-1747835025321.png

 

 

 

1 REPLY 1

Suresh_32
Tera Expert

Can any one to help me on this.