Hello
i am trying to extract a part of a string in a JavaScript step in a BPM, but when i do not have any issue with IndexOf method i get the error “Unable to evaluate script while executing activity 'Activity_1uhrh20' in the process definition with id 'e8f99a83-733f-11ee-b992-76d175c7f0d6':TypeError: Selection.substring is not a function in at line number 4” like if substring was not a javascript method (actuall y i test with substr and get the same bad result)
hereunder is my code
var Selection = execution.getVariable("Selection");
var pos_start = Selection.indexOf("RAM_NO=")+7;
var pos_end = Selection.indexOf("^");
var CCN_RmaNo = Selection.substring(pos_start, pos_end);
execution.setVariable("CCN_RmaNo ", CCN_RmaNo );
everything works ok except the line
var CCN_RmaNo = Selection.substring(pos_start, pos_end);
Anyone any idea?