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

How have you set the none option?
In look up select box options you should have "include none".
Then in your client  script (just tested) you should be able to check that with == ''.

I tried this and it worked perfectly fine on a lookup selext box.

function onChange(control, oldValue, newValue, isLoading) {
   if (isLoading) {
      return;
   }
   if(newValue == ''){
	alert('Alert for none');
   }else{
	alert('Alert for a valid value');
   }
}