-
oandbAsked on June 16, 2015 at 5:48 PM
My last question about a rule not working proved to be based on my misunderstanding of how Show/Hide rules work.
But this time, the issue is different - although maybe it's another misunderstanding!
This video explain it:
http://screencast.com/t/2Nkg6AQSiU
Related to this form:
http://www.jotform.com//?formID=51114586739360
Thanks.
Alex
-
raulReplied on June 16, 2015 at 8:19 PM
The conditions are also ordered by precedence which means that the first condition (if Var-P1Base is filled) will override the other conditions because it has a higher precedence. So, basically you would need to be more specific about when you want to insert the Var-P1Base into the Var-P1 field.
Or, you can also drag & drop the conditions in your form to change their precedence. When two or more conditions are met the first one on the list is the one that is executed.
I hope this makes sense to you.
Please let us know if you need more clarification on this matter.
-
oandbReplied on June 17, 2015 at 8:38 AM
Oh - I had completely misunderstood how that worked!
Yes - makes complete sense - it's just that I thought the conditions worked like "production rules" from the days of expert systems (all rules get executed in order) - if anyone remembers that technology.
Thanks - I'll re-assess my whole rule-base.
Oddly enough, in earlier testing I was getting exactly the correct results so I thought my understanding was correct. Seems like I'd just been lucky!
Thanks again - excellent support here!
Alex
-
BorisReplied on June 17, 2015 at 8:51 AM
On behalf of my colleague, Raul, you are kindly welcome.
Alex, please don't hesitate to contact us again should you need any more help with your forms. As always, we are here to assist.
-
oandbReplied on June 17, 2015 at 1:43 PM
Well, I'm still not getting the results I expect...
There are the conditions that set Var-P1 (I have re-arranged them from before):
When I run a preview and set
Regular Income? to "Yes" and Monthly Profit to "$1,000 - $2,500"
I'm expecting condition 52 to be satisfied and Var-P1 to be set to 0
But instead, condition 53 is matched, and Var-P1 is set to the value of Var-P1Base
How can that be?
Alex
-
David JotForm Support ManagerReplied on June 17, 2015 at 2:39 PM
Looking at your condition 52, I see is not declared as you have stated "Regular Income? to "Yes" and Monthly Profit to "$1,000 - $2,500"":
In order for this to work, you would need to either disable condition 53:
So it will work:
Or, you can re-declare it:
Which works too:
Let us know if you need more assistance, we will be glad to help you.
-
oandbReplied on June 17, 2015 at 3:28 PM
Hmmm...
I obviously still don't understand the logic of conditions.
I thought that as soon as it found a condition that set the value of a variable, it would not look at any subsequent conditions. But I guess that's not right.
Looking at my conditions, it's true that condition 53 is redundant since condition 48 handles "Monthly Income" = No and conditions 49-52 handle all possibilities for "Monthly Income" = Yes (with condition 52 being the 'catchall').
But what if the value of "Monthly Income"? could be "Yes", "No", "Maybe", "Possibly", "Could Be", "Don't Know"?
I might want to use condition 53 to handle all options except Yes and No - but that isn't going to work, is it?
It would be good to have a logically complete statement of how conditions work.
Could you provide this?
Thanks
Alex
Alex
-
raulReplied on June 17, 2015 at 4:43 PM
We have the following guides that should help you to understand the conditional logic. You can find them below:
https://www.jotform.com/help/57-Smart-Forms-Using-Conditional-Logic
https://www.jotform.com/help/196-Hide-or-Show-Multiple-Fields-at-Once
https://www.jotform.com/help/268-How-to-Insert-Text-or-Mathematical-Calculation-into-a-field-using-a-Condition
https://www.jotform.com/help/230-How-New-Conditions-For-and-Order-by-boxes-work-in-conditional-logics
https://www.jotform.com/help/316-How-to-show-or-hide-a-field-in-the-form-based-on-the-other-field-input-or-selectionI might want to use condition 53 to handle all options except Yes and No - but that isn't going to work, is it?
You can declare it like this:
So, the condition will be executed for any option besides "yes" and "no".
If you need further assistance, please don't hesitate to contact us.