- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2019 04:38 PM
I am using a list collector that references the sys_user table to capture which users need access to a product using a catalog item. Once the work is complete the workflow is set to send a notification to these users but I am unable to get it to work.
answer = [];
answer.push(current.variables.users_needing_access.sys_id);
Solved! Go to Solution.
- Labels:
-
Notifications
-
Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2019 11:13 AM
The answer was actually very simple. List collectors already save users in a comma separated list as required by notifications. I was very much over complicating it.
Heres what I ended up with that worked, I should have tried this first:
answer = [];
answer.push(current.variables.users_needing_access);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2019 04:43 PM
Hello,
I am assuming you are using the notification activity in the workflow.
Did you try using just the following?
answer = String(current.variables.users_needing_access);
Give it a try and see how it goes.
Hope this helps!
Cheers,
Manish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2019 04:44 PM
Try below script
answer = [];
var user_list =current.variables.users_needing_access.sys_id.toString();
answer=user_list.split(',');
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2019 05:34 PM
answer = ifScript();
function ifScript(){
var final = [];
var users = current.variables.users_needing_access;
return final.push(users.toString());
}
Please mark my response as correct and helpful if it helped solved your question.
-Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-17-2019 07:50 PM
variables.list_collector_variable return the sys_id's of users in comma separated values
Try this
answer = [];
answer = current.variables.users_needing_access.toString().split(',');