
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2017 05:13 AM
I have a business rule that runs in an application scope and the following fails when run in an application scope
var text = 'abc, def':
var temp = text.split(',');
however it works when running in global scope.
How do I call the split() function in an application scope?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2017 06:03 AM
Solved.
Adding a toString() before split() solved the issue. But strange this is necesary only when the rule runs in an application scope. The exact same rule worked fine in global scope without the extra toString()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2017 05:36 AM
If you copied the code then there's a spelling mistake
var text = 'abc, def':
var temp = text.spli(',');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2017 05:43 AM
No spelling error in the code.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2017 06:03 AM
Solved.
Adding a toString() before split() solved the issue. But strange this is necesary only when the rule runs in an application scope. The exact same rule worked fine in global scope without the extra toString()