How to Display the Required column of a table using the advanced qualifier in a reference field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 12:36 PM
In catalog item, I used the Variable type "reference" field to display the "AD names" from Table ABC
I had the Requirement to filter the "Table ABC" Results based on the dynamic value of single line text "GRP name"
I used the advanced reference qualifier script
Reference Qualifier : javascript:'u_name='+current.variables.grp_name
variable attributes : ref_ac_columns =display_name
I was facing issue .while getting the Table results it was displaying the 'u_name',but I need to get the display_name values
Suugest how can i get the display_name value in the Filtered Results
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 12:53 PM
@Sudesh : As per my understanding, if you click on magnifying icon, it shows you "u_name" column values but you need "display_name" to be displayed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 01:01 PM
@Sudesh : Check if the below articles helps you.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0686318
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 02:17 PM - edited 01-05-2024 02:19 PM
Hi @Sudesh ,
Based on details, the table ABC must have at least two column 1) for AD Names and 2) GRP Names(u_name) and reference field should show only matching record as per given grp_name field value.
Assuming the GRP name is text type field on catalog item and AD Name is reference to ABC table where there is matched record.
Catalog variable as below
Reference ( ADP Names ) qual setting , now
Result : ADP Name will display with matched GRP named record
You just need the change the below, considering the ADP Name column has display=true.
variable attributes : ref_ac_columns =grp_name
-Thanks,
AshishKMishra
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2024 11:08 PM
Here are the steps you can follow to get the 'display_name' values in the filtered results:
1. First, you need to ensure that the 'display_name' field is present in the 'ABC' table and it is populated with the correct values.
2. In the 'Variable Attributes' field of the catalog item variable, you need to add 'ref_ac_columns = display_name'. This will ensure that the 'display_name' field is used for auto-complete suggestions.
3. In the 'Reference Qualifier' field of the catalog item variable, you need to use a script like this: javascript
javascript:'display_nameIN'+current.variables.grp_name
This script will filter the 'ABC' table based on the 'display_name' field.
4. Save the changes and test the catalog item. The 'display_name' values should now be displayed in the filtered results.
For asking ServiceNow-related questions try this :
For a better and more optimistic result, please visit this website. It uses a Chat Generative Pre-Trained Transformer ( GPT ) technology for solving ServiceNow-related issues.
Link - https://nowgpt.ai/
For the ServiceNow Certified System Administrator exams try this :
https://www.udemy.com/course/servicenow-csa-admin-certification-exam-2023/?couponCode=NOW-DEVELOPER