IT Process Automation

Function trim() Not Supported in PAM 4.x 

Jul 21, 2015 03:35 AM

The JS engine PAM 4.x uses does not support trim(). If you attempt to use it in a javascript code in a PAM Run Javascript Operator, it will result in an error similar to this:

 

--TypeError: Cannot find function trim. (#16).

 

The alternative is to use this instead:

 

.replace(/^\s+|\s+$/gm,'')

 

For example:

 

var trimmedTitle = Process.theTitle.replace(/^\s+|\s+$/gm,'');

Statistics
0 Favorited
3 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.