Solved

isNullorEmply() field not working for a hidden panel


Hi, 



 



I have a hidden panel in my Nintex form that has a required field. When a user goes to submit the form, the form doesn't submit because the it returns with an error message "Fill in required field", however it is hidden to the user.



 



Is there a formula I can apply to the hidden panel field to only be required when in edit mode? 





 



Any help appreciated.



 



 

icon

Best answer by SimonMuntz 3 October 2019, 03:27

View original

10 replies

Userlevel 5
Badge +17

Hi,
Basically you need to apply a similar rule to the validation as you do for hiding the panel.
Example:
If you hide a panel when a choice control is yes : Choice == "Yes"
You have a control in the panel that does not need validation when Choice == "Yes"

Validation would be and(isNullorEmpty({Self}),equals(Choice,"No"))

If choice is No the panel will not be hidden and therefore the control will need validation.



Sample Classic form attached to demonstrate this functionality.

I applied what you've told me and it worked! 



 



Thank you!

Hi,



I tried to use this in Responsive form and didn't work. 



does it work diffrent in responsive form than Classic form.



 



Thank you for your help.



 

Userlevel 5
Badge +17

@rkbud This works the same in classic or responsive forms.

OPTION&&isNullOrEmpty(Hidden field) . this formula works for me.

But i have another issues while validating hidden field. Hidden field is shown when there is multiple drop down values. lets suppose, we have dropdown field with A,B,C,D,E values. field is hidden when D,E is selected. I am using Option="A"&&Option="B"&&Option="C"&&isNullOrEmpty(HiddenField)
Userlevel 5
Badge +17
This is expected behavior. The only way controls can be validated when hidden is if they are connected to a SharePoint column and that SharePoint column is set as required.

In my case, Hidden field is connected to sharepoint column and non required column. 

@SimonMuntz Sorry if i wasn't clear on my previous post. I am trying to validate hidden date field when that field is shown on the form. I have two column i.e. Column A with multiple dropdown(values A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P) and  Column B (date field). Column B  field is shown when dropdown on Column A are A,B,C,D,E,F,G,H,I only. 



I have formula to hide the field as Column A!="A"&&Column A!="B"&&Column A!="C"&& Column A!="D"&&Column A!="E"&&Column A!="F"&&Column A!="G" && Column A!="H"&&Column A!="I".



I get validation to work when chosing only one value ie. equals(Column A, "A")&&isNullOrEmpty({Self}). The issues is if i tried to add other values in validation. It won't work. I am trying to minimize writing other eight rules for the same field. 



 



Thank you in advance for your help.



 

I used 'or' expression and got it to work.



or(equals(Column A, "A"),or(equals(Column A, "A")))&&isNullOrEmpty({Self})



 



 

Badge +3

Hi all,



need to seek your expertise.



I have a Nintex form with two fields as follows:



Accessby : drop down field



Approval : people field (hidden by default, shown only based on the value of Accessby)



 





  1. I need to hide Approval by default and show Approval field only when Accessby is showing 3 values e.g. "Cat1" "Cat2" "Cat3" (applied hide rule which is working fine)


  2. When Approval field is shown, I want to make sure users fill in at least one person and not leave as empty field.




 



I tried the following at the Rule section of the Approval field, but the system does not do Step 2 above, what is the correct formula to ensure that the Approval field is not empty when shown? :





  1. and(isNullOrEmpty({Self}), or(equals(Accessby, "Cat1"), equals(Accessby, "Cat2"), equals(Accessby, "Cat3")))


  2. isNullOrEmpty({Self}) and (Accessby == "Cat1" or Accessby == "Cat2"or Accessby == "Cat3") 


  3. isNullOrEmpty({Self}) && (Accessby == "Cat1" || Accessby == "Cat2" || Accessby == "Cat3") 




 



When I tried isNullOrEmpty({Self}) alone, the system immediate prompt me that the Approval field is empty even though the Approval field is hidden (note that I did not tick the "validate when hidden")



 

Reply