Check if checkbox is checked in formula in a form variable

  • 15 April 2019
  • 6 replies
  • 67 views

Badge +3

We are using SharePoint 2013 with Nintex 2013. I have a form with a panel. Inside the panel I have 2 controls. The target is that if one of these 2 controls in the panel is selected the "description" control will be visible. For the dropdown it is working fine, but not for the checkbox. How can I check in a formula if a checkbox is checked?

 

This is my formula expression at this moment. It returns if panel1 is completed or uncompleted.

 

If(isNullOrEmpty(DropDownControl1), uncompleted', 'completed')

 

I try to extend this expression with something like this but it dont work:

 

If(not(isNullOrEmpty(DropDownControl1)) || CheckBoxControl1, 'completed', 'uncompleted')

 

1511i86973A32C779CD51.png


6 replies

Badge +9

a Yes/No control evaluates to true if checked otherwise to false. So use control name in formula:

 

If(not(isNullOrEmpty(DropDownControl1)) || CheckBoxControl1

Badge +3

Hi @mlauer , I try this but dont work:

 

If(not(isNullOrEmpty(DropDownControl1)) || CheckBoxControl1, 'completed', 'uncompleted')

Badge +9

Following formula is working in a calculated value Control or in a forms variable:

If(not(isNullOrEmpty(DropDownControl1)) || CheckBoxControl1, 'completed', 'uncompleted')

You have to insert named controls by formula builder. So they are shown in red.

Badge +3

Hi @mlauer ,

 

I did use the formula builder and the controls are red. So at this moment I dont see a differance between your example and mine.

Badge +3

Does someone know why it is not working? Or can someone reproduce this problem?

Userlevel 5
Badge +14
 The target is that if one of these 2 controls in the panel is selected the "description" control will be visible

 

so I guess you're talking about formatting rule's formula, right?

in that case the formula should look like (note the formatting rule hides the control)

 

isNullOrEmpty(DropDownControl1) && not(CheckBoxControl1)

 

Reply