how to display values of one table from another table using client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 05:43 AM
i have a request where i have one field called "requested By" from "sys_user" table which is of reference type variable in catalog form.
i have other variables where it should display the values from "computer table" based on name from above table.
Can anyone help me on this
- Labels:
-
Team Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 06:41 AM
Hi,
you can use GlideAjax to get the display value as client side doesn't allow multiple dot walking
check this link which has solution on how to return multiple values from GlideAjax and set those; enhance for your case
Get User Details based on the Logged in user/ User selected in Client Script
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 06:51 AM
Hi,
Sorry I didnt realise you were using client script.
I will definitely recommend approach suggested by Ankur. That is best practice. Also to get value for second you need to double dotwalking which is not supported in getRef callback function so you left with choice of GlideAjax or Business rule.
Thank you
Prasad