How to add static option on Lookup Select Box catalog item variable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi,
I have one requirement.
I have three catalog form questions (Q1, Q2, Q3) referencing the same table. Q2 options depend on Q1, and Q3 options depend on Q2 using logic in a Script Include. I need to add a static option to Q3 regardless of the dynamic population. g_form.addOption() isn’t working. How can I achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @KS86 ,
use reference qualifier
have a record (for the static option)on the table that the choice field is referencing and use reference qualifier.
based on the condition or always
you can have the script include return the reference qualifier and use the script include in the q3 reference qualifier
if you still having issues
please share all the details of your business requirement
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
If I create the record in the table, Q3 is always showing up on form. It has to show only when we select any option in Q2.
Please assist.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday - last edited yesterday
How about hiding Q3 till anything is selected on Q2
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
then in the advanced ref qualifier of Q3, let it bring the options based on Q2 you can include your static option using OR condition
Something like this
javascript:'Your ExistingReferenceQualifier' + '^ORvalue=yourChoiceValue';
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
