- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2022 12:26 AM
Hi all,
What does below statement returns? what is meaning of sys_idN
return 'sys_idIN' + ccList;
Note: ccList: its an array consisting of sys_id's.
Thanks in Advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2022 12:29 AM
Hi Sachin,
In short it represents encoded query. The above script is generally used at advanced reference qualifiers. It means whatever sys_id's exist in 'ccList' variable, those many records can be entered/selected in that reference field.
Let me know if you have any further queries.
Please mark this as Correct or Helpful if it helps.
Thanks and Regards,
Abhijit
Community Rising Star 2022
Regards,
Abhijit
ServiceNow MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2022 12:29 AM
Hi Sachin,
In short it represents encoded query. The above script is generally used at advanced reference qualifiers. It means whatever sys_id's exist in 'ccList' variable, those many records can be entered/selected in that reference field.
Let me know if you have any further queries.
Please mark this as Correct or Helpful if it helps.
Thanks and Regards,
Abhijit
Community Rising Star 2022
Regards,
Abhijit
ServiceNow MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2022 12:50 AM
Hi Abhijit,
can i use just "return ccList". Because i known it's consisting of sysid's only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2022 12:56 AM
No, you can't use that. As I said before, what we are returning is not just array of sys_ids rather it is encoded query.
System should understand what needs to be done with those array of sys_ids. So with encoded query, we specify that those array of sys_id's needs to be matched with sys_id of the record in target table.
Let me know if you have any further queries.
Please mark this as Correct or Helpful if it helps.
Thanks and Regards,
Abhijit
Community Rising Star 2022
Regards,
Abhijit
ServiceNow MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2022 02:01 AM
Thank you Abhijith