- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2024 04:15 PM
I have requriement in add the watchlist catlog item variable in ritm
For example
Caylog item variable is
Add user to the ritm filed- reference filed
If I selected one user in this filed after sumitting ritm in that ritm watchlist need to add that user name, which I selected from catlog item variable.
Any one help here
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 06:57 AM
I'm not clear weather you are saying this is or is not working. It's unnecessary lines of code and value manipulation as a List Collector variable stores a comma-separated list of sys_ids, as does the watch_list which is a List type field, so a direct value assignment as I suggested will work fine in this case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 04:43 AM
If I'm following correctly, you'll want to create a List Collector type variable (to allow selection of more than one user) or a reference type variable (to allow the selection of only one user). Since it sounds like this selection will be made on the request form, you can copy the selection(s) to the RITM watchlist by creating a before Insert Business Rule on the sc_req_item table. The Script in the Advanced section would just be something like
current.watch_list = current.variables.var_name;
where var_name is the name of your variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 05:11 AM
Thanks .
in business rule tried when to run selected before and insert now working expected same.
(function executeRule(current, previous /*null when async*/ ) {
var reqFor = current.variables.var_name;
var wlArray = [];
if (reqFor != '') {
wlArray.push(reqFor.toString());
current.watch_list = wlArray.toString();
}
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 06:57 AM
I'm not clear weather you are saying this is or is not working. It's unnecessary lines of code and value manipulation as a List Collector variable stores a comma-separated list of sys_ids, as does the watch_list which is a List type field, so a direct value assignment as I suggested will work fine in this case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2024 09:06 AM
Thanks