- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2016 11:00 AM
Hi. Thanks in advance for your help.
I have a UI action that creates a RELP from a RITM. In the UI action, I'd like to get several different usernames from various fields from the RITM and add them to a watchlist on the RELP.
Here's what I have...
var arrayUtil = new ArrayUtil(); | |
var a1 = new Array(current.variables.relp_qa_analyst.getDisplayValue(), current.variables.relp_senior_dev.getDisplayValue(), current.variables.relp_release_engineer.getDisplayValue(),current.variables.relp_pm.getDisplayValue()); | |
relp.watch_list=arrayUtil.unique(a1); |
However, I end up with this on the RELP...
I don't know how to add the individual values in the array to the watch list. Help?
Thanks again,
josh
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2016 01:13 PM
The watch list is a comma separated list of sys_ids (to user records). The variables already contain sys_ids so there's no need to use .getDisplayValue() to display a friendly human name. Try this:
var a1 [];
a1.push(current.variables.relp_qa_analyst);
a1.push(current.variables.relp_senior_dev);
a1.push(current.variables.relp_release_engineer);
a1.push(current.variables.relp_pm);
relp.watch_list=a1.join(',');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2016 12:55 PM
remove .getDisplayValue() and .sys_id to all a1 variables

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2016 01:13 PM
The watch list is a comma separated list of sys_ids (to user records). The variables already contain sys_ids so there's no need to use .getDisplayValue() to display a friendly human name. Try this:
var a1 [];
a1.push(current.variables.relp_qa_analyst);
a1.push(current.variables.relp_senior_dev);
a1.push(current.variables.relp_release_engineer);
a1.push(current.variables.relp_pm);
relp.watch_list=a1.join(',');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2016 10:57 AM
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
If you are viewing this from the community inbox you will not see the correct answer button. If so, please review How to Mark Answers Correct From Inbox View.
Thank you