Variables are not cleared when changing to NONE in look Up

Community Alums
Not applicable

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.

 

RipunjaiGurava_0-1709207394743.png

Thanks,

Ripunjai.

 

5 REPLIES 5

bradleydebono
Mega Guru

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

 

Weird
Mega Sage

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.

AshishKM
Kilo Patron
Kilo Patron

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

Community Alums
Not applicable

Hi @Weird , @AshishKM ,

I tried with the below as suggested. But I believe for option "None" we dont have any value. So, its not giving the alert, when I click on "none" in the portal. Any alternatives?

RipunjaiGurava_0-1709618709434.png

Thanks,

Ripunjai.