- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2023 09:17 AM
Hi,
I have 2 reference variables. Variable A and Variable B. Variable A is a reference to cmn_cost_center. Variable B is a reference to a custom table and has a reference qualifier for Variable A. When the user selects an option from Variable A it populates Variable B with a list of items associated to Variable A for the user to select. That is working correctly.
Here is what I cannot seem to get to work:
If the user selects an option from Variable A that does not have any associated items to Variable B then Variable B should be hidden.
What is the best way to hide Variable B if it does not get populated?
Thank you in advance for any assistance,
Diana
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2023 02:43 AM
Hi Diana,
This script wont work, you have to write a GlideAjax and call a script include. In there you need to mimic the same query as your Reference Qualifier (u_active=true^u_type=opex_id^u_cost_center='+ current.variables.cost_center;) and check if there are any options present to be shown in variable B, if this count is more than 0 then return back a flag value based on which you can show variable B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2023 02:43 AM
Hi Diana,
This script wont work, you have to write a GlideAjax and call a script include. In there you need to mimic the same query as your Reference Qualifier (u_active=true^u_type=opex_id^u_cost_center='+ current.variables.cost_center;) and check if there are any options present to be shown in variable B, if this count is more than 0 then return back a flag value based on which you can show variable B