So I have a SharePoint calculated list field already which adds up how many of the three Yes/No checkbox fields are checked using the formula:
This works great when the column is displayed in a list view, but I wanted this list field & its value to also display on the Nintex form. However, when I try to add the calculated list field to the form, there is no option to display a calculated field type from the list onto the Nintex form. If there is a way to do this please let me know and that will solve my issue.
In the absence of that option, I've now tried to add a Nintex calculation control to my form to do the same calculation AND display on the form. Now my problem is I can't get the field to dynamically recalculate when the fields are toggled on/off while in the edit mode. It DOES recalculate when I save the form & reopen, but not when I'm in the form editing. I have all of the Nintex form calculated field settings set to Recalculate on all form types.
Here's my formula...any thoughts on how to trigger the calculated field to recalculate when I toggle the checkboxes?
Solved! Go to Solution.
Try creating a form variable first. In the option, where it says to recalculate the formula, select yes. Then apply this variable to your calculated field. You can also select a connected field to store this value in the list and vice versa. Hope it helps.
So I created a form variable and put my formula in there and set all of the recalc formual setting values to yes (this was the same as my original calculated field), then set my original calculated field to just display the variable value, but it made no difference...the value doesn't toggle in edit mode, only after I save and then re-open the form.
Hi Robyn Courchane ,
Check boxes do not need '==' condition. By default it will return true if checked.
But adding multiple If condition doesnt seem to work, i just checked. So i created 3 calculated fields and a 4th one to sum these 3. Then it shows the calculation on the form. Try it and see if you can bypass extra fields.
Still doesn't save the values unless I save the form and reopen. I added 3 new calculated fields (temporarily showing to the right of each checkbox field below). Each has the formula If(Field,1,0) where Field is the name of the corresponding checkbox item property.
The 4th calculated field in the upper right adds the 3 fields below together.
This screen shot is of a form that when I opened the form, ALL 3 checkboxes were checked, thus a rating of 3.
I then unchecked the 2nd and 3rd box (shown below) and as you can see the corresponding calculated field did NOT update the value to 0 (even though recalc settings are all Yes) and the Rating didn't update the total to 1.
When I save and re-open the form, the values are updated.
I'm really trying hard to replace an InfoPath form here, but without a solution to this, I'm stuck.
Kapil- thank you for the sample form. I figured out why mine wasn't working from it. I was using the Item Property in my If(Field,1,0) formula and should have been using the Named Control instead. Once I made that change I used the formula in 3 Form Variables rather than 3 Calculated fields and then added up the form variables in the original Calculated Field to show the total. Using the form variables keeps things a little cleaner.
Thanks for working through this with me. I appreciate your help!