I added the JSL below as Custom Action in the Workflow builder.
The error happened at the For loop (Error: Send Expects Scriptable Object).
While running this script in Script window, it works properly to rename columns header that contain "%, ".
Any idea on how to solve this to make the workflow more smooth? else, need to stop at this step to run Column Renaming script outside the WorkFlow Builder.
dt = Current Data Table();
searchWords = "%, ";
columnName = dt << Get Column Names;
N = N Items( columnName );
For(j=1, j<= N, j++,
x = contains(columnName[j], searchWords);
name = Substr(columnName[j] << Get Name(), x+3);
If(x > 0,
columnName[j] << Set Name(Left(name, Length(name)-1));
);
);