- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 04:04 AM - edited 01-22-2024 04:18 AM
Hi everyone, I created a custom field on "task" table which will get the current assigned user everytime it changes without removing the one that is already there, I not sure on how to do this. Im thinking about trying a Business rule on "task" table with:
Before > Update
var assignedTO = current.getValue('assigned_to');
var listField = current.getValue('listColletorUsers');
listField = current.listColletorUsers + current.assigned_to;
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 04:40 AM
Update the script as follows.
var assignedTO = current.getValue('assigned_to');
var listField = current.getValue('listColletorUsers');
if(listField.indexOf(assignedTO)==-1){
listField =listField+',' + assignedTO;
current.setValue('listColletorUsers',listField);
}
Hope this works for you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 04:19 AM
@F_bio Santos List collector is nothing but a comma separated string of sys_ids. Please check if the following script works.
var assignedTO = current.getValue('assigned_to');
var listField = current.getValue('listColletorUsers');
listField =listField+',' + assignedTO;
current.setValue('listColletorUsers',listField);
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 04:23 AM - edited 01-22-2024 04:25 AM
Hi @Sandeep Rajput it worked, but for some reason it is getting the user 3 times. Could it be because I have:
before > update
Assigned_to > changes

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 04:40 AM
Update the script as follows.
var assignedTO = current.getValue('assigned_to');
var listField = current.getValue('listColletorUsers');
if(listField.indexOf(assignedTO)==-1){
listField =listField+',' + assignedTO;
current.setValue('listColletorUsers',listField);
}
Hope this works for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2024 04:29 AM
Please have a look on the below post :
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.