In my previous blog post Advanced Calculated Values I wrote about using calculations in a Nintex Mobile Form to sum occurrences and points to my Warehouse Inspections demo. Using check boxes (or sliders) and input boxes, the form would calculate the sums. But we found that there are some user experience issues with the form. In this blog, I will show how to use rules within a form to improve the user experience.
Looking back, I had three types of user input to the inspection form.
The first input would allow the user to type in the input box even before they select the incident as occurred. I would like to disable the input box until the user slides the slider to indicate that there was an issue. To do this you click on the input box and then click Add in the rules pane as seen below.
Then configure the rule as a formatting rule, set to disable, then configure the condition using the fx button to the right. I set the condition formula to not(chk1) which will say that when it is not checked to disable the input box.
And the result is as follows
For the third selection I needed to disable the sliders for the various amounts when the initial slider was disabled. That was no problem as I simply added the same rule as before with not(chk3). But that was not all. The user could still select multiple values instead of just one. To remove that possiblity I added rules for each slider using formatting rules to disable the control if at least one of the other two were selected. Take the first slider for example. I named it chk3a, to disable it if one of the others were selected use the rule or(chk3b, chk3c). So if one of them were selected then that control would provide a TRUE value. The OR formula returns TRUE where either logical arguments are true. Returns FALSE when both logical arguments are False.
To follow this, for the second slider the formula was or(chk3a, chk3c). Then or(chk3a, chk3b) for the third. The results would appear as follows.
all values disabled until the incident is selected
Incident is selected, so now all three are enabled
Selecting the first one disabled the other two and so on.
There are several ways to use validation rules in this scenario in Nintex Mobile forms. We could require at least least one incident to be reported, require a certain sum from the calculation, or require data from input fields at the beginning at the form.
But two important validations that became useful based on user feedback was to require a value to be inputted for the incidents that allow a number to multiply the points. This way the user would know they answered the form correctly and not accidentally left a field blank where a number greater than 1 was required. Because we assumed a multiplier of one when the slider was selected, this became possible. The formula used on this option was If(chk1, If(tv1<1, true, false), false). Let's break this down.
If the first incident was selected, then the input control is invalid if the value is less than 1. Otherwise it is valid.
Trying to submit the form without providing a value would result in the following
The last validation we added was a slider check box at the very end of the form. Imagine a form with dozens of questions. It may be very long and you want to make sure that the user checks on the total incidents and total points. In order to make sure the user saw this we added a slider/checkbox at the end with a simple label beside it. "Do you accept the total violations and total points?" A validation rule of not(chkLast) would make sure that it was checked, otherwise it was valid. Remember, the checkbox control provides a boolean value. So if it is checked, a TRUE would be returning. For validation rules, a TRUE value means the control is invalid. A little backwards, but it works. So if the use the "not" formula, we use the opposite. So if the slider is checked, then force the value to be FALSE, which means the control is valid. Read that a few times, and make sure you see the tooltip when creating formulas to help you with the intended value.
Hopefully these two posts were of help. This one was a little winded, but I wanted to make sure you could see the full example. This post reviewed how adding formatting rules and validation rules to forms (and Mobile forms) can improve the user experience. Let me know if you have questions and I will try to track the comments below. Happy Nintexing!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.