Variables are not cleared when changing to NONE in look Up

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2024 04:01 AM
Hi All,
We created a new custom table. Where the variables are called from that that table. The variable to display the values/options is "Lookup select box" type. Using this, lookup, I'm displaying the other variables. But if I click on "None" the old or preselected values for other options needs to be cleared. How can this be achieved? As "None" has no value. Due to that I cant set the value in the backend to clear.
For eg: From below figure, If I select "Create" from "Request for" drop down(lookup). the new variables -> Business justification & service selection is visible. But again if I click on None, those variables should not be visible. I need this to be achieved globally rather than adding the UI actions on Item.
Thanks,
Ripunjai.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2024 04:08 AM
Hi Ripunjai,
Typically one would use UI Actions for this. Can you elaborate on what you mean by " I need this to be achieved globally rather than adding the UI actions on Item" please?
Many thanks,
Brad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2024 04:08 AM
What kind of setup do you currently have for the visibility of the other fields?
Client script should work fine if you use something like
if(newValue == ""){
g_form.setDisplay('other_field', false); //or setVisible
}
And on UI policies I think you should still be able to select "is empty" on a filter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2024 04:08 AM
Hi @Community Alums,
You can write catalog client script [ onChange ] on requested for variable.
Check the selected value, if it's not either one of listed them apply the setVisible() false on variables.
You can try with UI Actions also.
-Thanks,
AshishKM
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
‎03-04-2024 10:06 PM