- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 08:32 AM - edited 11-06-2023 08:34 AM
Hi All,
I have a table sn_customerservice_campaigns and the fields are u_kit(list collector) and u_kit_description (string)
u_kit(list collector) references sn_customerservice_part table and the fields I want to pull in are u_part_number and u_part_description.
when a part is selected in the u_kit field I need to get the number and the description to populate in the u_kit_description field
example (S1030006K001 - this is a description, A5001700B026 - This is a description).
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 10:33 AM
Hi Michael,
A List field or List Collector Catalog Item variable store a comma-separated list of sys_ids for the referenced table. What you'll need to do is use this value in an onChange Client Script when the list field/variable changes. The Client Script will use GlideAjax to call a Script Include, passing in this value as a parameter. The Client callable Script Include will query the referenced table where the sys_id is 'IN' this list passed in from the Client Script and for each record returned, append a string or array script variable with the number and description, then return the value of this script variable to the Client Script, which will set the value of the string field/variable to the returned value. If you're not familiar on the syntax and methods for all of this, here is an excellent guide.
Give it a shot and post your scripts if you get stuck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 10:33 AM
Hi Michael,
A List field or List Collector Catalog Item variable store a comma-separated list of sys_ids for the referenced table. What you'll need to do is use this value in an onChange Client Script when the list field/variable changes. The Client Script will use GlideAjax to call a Script Include, passing in this value as a parameter. The Client callable Script Include will query the referenced table where the sys_id is 'IN' this list passed in from the Client Script and for each record returned, append a string or array script variable with the number and description, then return the value of this script variable to the Client Script, which will set the value of the string field/variable to the returned value. If you're not familiar on the syntax and methods for all of this, here is an excellent guide.
Give it a shot and post your scripts if you get stuck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 12:24 AM
This Is awesome thanks @Brad Bowman
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 04:34 AM
You are welcome!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2023 04:46 AM
please refer this link . I have similar requirement and i have develop the code