- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2023 07:47 AM
Hi,
I have a lookup select box (references pm_portfolio) variable called Portfolio name that has 5 options, one of them is called "Project portfolio". There is another variable called "is_the_workload_bigger_than_50_man_days", if the workload variable is No, then the Project portfolio option from the portfolio name variable should not be shown. At any other time, all 5 options should be shown.
I know removeOption/addOption doesn't work because it's a reference field. So it's going to be an advanced reference qualifier right? How do I set this up? Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2023 08:13 AM
you can use advanced ref qualifier
Ensure you set variable attributes in the lookup select box variable
ref_qual_elements=is_the_workload_bigger_than_50_man_days
Ref qualifier:
Ensure you compare correct value for No or no
javascript: var query; if(current.variables.is_the_workload_bigger_than_50_man_days == 'No') query = 'name!=Project portfolio'; query;
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2023 08:11 AM
Hi @JordyZ
Yes, You need to use Advanced Reference Qualifier. In that You can send the Checkbox value as parameter to Script Include and by using that parameter you can filter your values
somthinglike below
If('your_parameter' == true){
filter with 4 option value
}
else{
filter with 5 Option Values
}
Please Mark my Answer as correct/Helpful if it helps you.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-19-2023 08:13 AM
you can use advanced ref qualifier
Ensure you set variable attributes in the lookup select box variable
ref_qual_elements=is_the_workload_bigger_than_50_man_days
Ref qualifier:
Ensure you compare correct value for No or no
javascript: var query; if(current.variables.is_the_workload_bigger_than_50_man_days == 'No') query = 'name!=Project portfolio'; query;
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2023 02:37 AM
This did the job, thank you @Ankur Bawiskar !