- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2024 08:42 AM - edited 02-27-2024 12:49 PM
Hello,
I'm currently working on a Catalog Item were I lookup data of the knowledge table.
The first catalog question (Q1) is a reference variable on "kb_knowledge" with a few filter to limit the list.
Following questions are auto-populated based on the article choose in Q1.
My issue is that the default display value in Q1 is the "display_number" field,
but I would like the user to be able to search by short_description instead (because it contain an ID from another system and it's the information they will know).
My Question : What is the best way to proceed ? Can I keep Q1 as a reference variable but update all the display value ?
I tried to use a Lookup Select Box, it do the job for the display value itself, but I can't use the "Auto-populate" based on Q1 value anymore...
I looked into "setValue(String fieldName, String value, String displayValue)" but not sure how to use it for my need or if it would even work.
I want to minimize the amount of scripting as much as possible to achieve this.
Changing the default display field in the table is not an option.
Let me know if you need more details.
Thank you for your help !
EDIT 1 :
I just though of maybe using Lookup Select Box for presenting the choice to the user in Q1, and then use the answer to set an hidden reference variable (Q2) with the same answer, and base all my Auto-populate on Q2 instead.
What do you think ? Would this work ? Is there a better option ?
I just found out that Lookup select box is limited to 10,000 choices and this knowledge base has over 20k articles (even when filtered), so this is no longer an option...
EDIT 2 : Precisions
I don't want to change the display value of the selected article, I want to change all the display value in the list before the user get to select one.
Currently, Q1 is configure only trough the variable form, I have no client script to populate it. But I try to change display value with a Client Script
I added screenshot of the Q1 Variable Config, Q1 on the Service Portal and Q2 Variable config.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2024 02:01 PM
Yeah...Looks like it works
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2024 08:58 AM
Hello Guillaume D
Use the Client Script section of Q1 to modify the display value shown to the user:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2024 12:14 PM
Hi @Umesh Dubal 171 ,
Thank you for your Answer.
I looked into your suggestion but wasn't able to make it work.
I didn't find the "getReferenceRecord" and "setDisplayValue" seems to be only available server side.
In my case, I don't want to change the value for the selected article, I want to change all the value in the list before the user get to select one.
I'll add some capture in my main post !

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2024 11:20 AM
In the Lookup Selectbox, did you make sure to use the sys_id in the 'Lookup value field' so that, the other fields can use sys id to auto-populate other fields?
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2024 11:51 AM
Yes, I did use the sys_id in the "Lookup value field", but the in the Auto-populate tab, you can only specify as "Dependent question" a reference variable question.
So I can't use this functionality with a Lookup Selectbox and it would required scripting to auto-populate other field.