cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
ab50439
Nintex Newbie

Conditional Startup for when checkbox gets checked

Jump to solution

I want to trigger a workflow when a user updates a list item with a checkbox being changed from unchecked to checked.  The approach I was taking was to set a conditional startup option where the previous value of the checkbox equals No and the current value of the chekbox equals Yes. 

 

This works on all newly created items in the list, but I'm having trouble with existing items.  For those, although the checkbox looks unchecked, its actual value is null.  So the previous value of the checkbox doesn't "Equal" No, but it also doesn't "Not equal" No.  It looks like Nintex Workflow doesn't allow me to look for a null value.  I can only choose Equals or Not equals as the operator, and only Yes or No as the value.

 

Nintext Conditional Startup.png

Labels: (1)
0 Kudos
Reply
13 Replies
powersj1
Nintex Newbie

Re: Conditional Startup for when checkbox gets checked

Jump to solution

Can you do FinishedReportAttached Equals Yes and FinishedReportAttached (previous value) Not equals FinishedReportAttached?

0 Kudos
Reply
ab50439
Nintex Newbie

Re: Conditional Startup for when checkbox gets checked

Jump to solution
That was the first thing I tried and the workflow doesn't get triggered. Null != anything always equates to False... or to Null.
0 Kudos
Reply
ab50439
Nintex Newbie

Re: Conditional Startup for when checkbox gets checked

Jump to solution

For comparison, in a different workflow, I needed to run a query on a list based on a checkbox being unchecked.  I was able to work with the null values by looking for them separately:

 

Nintex checkbox query.png

0 Kudos
Reply
Jekaterina
Nintex Newbie

Re: Conditional Startup for when checkbox gets checked

Jump to solution

Hi @ab50439 ,

Assuming you are talking about Yes/No field and you need the workflow to be started on item update when the field value is changed to Yes:

NintexComm.PNG

I tried to reproduce the behavior you've described, but in my case everything worked just fine Smiley Happy

0 Kudos
Reply
ab50439
Nintex Newbie

Re: Conditional Startup for when checkbox gets checked

Jump to solution

In order to reproduce this, you need to add the Yes/No checkbox to a list that already has existing records.  When you do this, the existing records will have the new Yes/No field set to Null instead of No/False/0.  Any new records created in the list after the new Yes/No checkbox was added will have the checkbox's value set to No/False/0 and should work fine.

0 Kudos
Reply
ab50439
Nintex Newbie

Re: Conditional Startup for when checkbox gets checked

Jump to solution

Here's the test to show the values of the checkbox.  I query all the values in the SharePoint list and print to the history list.  However, when I try to copy the checkbox value from the collection variable into a checkbox variable, I get an error.  The workflow won't allow a null value in a checkbox variable:

 

Workflow null checkbox 1.pngWorkflow null checkbox 2.png

0 Kudos
Reply
ab50439
Nintex Newbie

Re: Conditional Startup for when checkbox gets checked

Jump to solution

So instead of putting the values from the checkbox field into a checkbox variable, I put it in a text variable.  Now it works.  You can see in the history log that the checkbox value is blank up until a certain point, which is when the field was added.  After that, it's No:

 

Workflow null checkbox 3.pngWorkflow null checkbox 4.png

0 Kudos
Reply
Community Manager Community Manager
Community Manager

Re: Conditional Startup for when checkbox gets checked

Jump to solution

@ab50439 glad you got it working. Could you mark one of these responses as the correct solution or type out what the solution was that worked for you?

0 Kudos
Reply
ab50439
Nintex Newbie

Re: Conditional Startup for when checkbox gets checked

Jump to solution
No, I did not get it working. I did tests to show what the problem is.
0 Kudos
Reply