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.
Solved! Go 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:
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:
I tried to reproduce the behavior you've described, but in my case everything worked just fine 🙂
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.
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:
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:
@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?