- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2017 07:19 AM
In fulfiller workflow script, I am getting a multi text variable called get_name that array is assigned to in catalog client script. Here is what multi text variable looks like,
After submitted, In workflow script, gs.log(getList); is showing exactly log result as multi text box above,
However it seem when I try to use var lines = getList.split(','); to split members using comma and test it using log again but it not printing anything and sometime I get undefined. What is wrong with my code? Why getList is able to get string values but not lines variable? Here my sample codes,
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2017 08:04 AM
Hi Bradley,
Can you try toString() and give it a try?
var lines = getList.toString().split(',');
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2017 07:33 AM
Hi Bradley,
Can you share the log which is getting printed with Member is.
your code seems to be correct may be once you share the logs more can be inspected.
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2017 07:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2017 08:04 AM
Hi Bradley,
Can you try toString() and give it a try?
var lines = getList.toString().split(',');
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2017 08:15 AM
It working! I didn't know it need to have toString() as I thought it was already a string values. Thanks!