SarahEldurini
6 years agoQrew Trainee
Dynamic Form Rules
Hello,
I have a form where a user has to insert the number of products (1-3), then, if the user inserts 1, ONE row of fields of the products details should show and user will have to fill (Model1, Expiry Date1, Status1), if the user chooses 2, TWO row of fields of the products details should show and user will have to fill (Model1, Expiry Date1, Status1) AND (Model2, Expiry Date2, Status2) , if the user chooses 3, THREE row of fields of the products details should show and user will have to fill (Model1, Expiry Date1, Status1) AND (Model2, Expiry Date2, Status2) AND (Model3, Expiry Date3, Status3)
I have created 9 Fields:
Model1, Model2, Model3
Expiry Date1, Expiry Date2, Expiry Date3
Status1, Status2, Status3
I created a rule: if number of products = 1, hide Model2, Model3, Expiry Date2, Expiry Date3, Status2, Status3
I wanted to create a second rule: if number of products = 2, hide Model3, Expiry Date3, Status3
but an error message showed up saying that:
"Rules #1 and #2 are both 'show/hide' rules on the same field (Model3).
Only the last (highest numbered) of these rules will have any effect. Consider combining these rules into a single 'multiple condition' rule instead. more..."
how can I solve this?
Thank you
------------------------------
Sarah Eldurini
------------------------------
I have a form where a user has to insert the number of products (1-3), then, if the user inserts 1, ONE row of fields of the products details should show and user will have to fill (Model1, Expiry Date1, Status1), if the user chooses 2, TWO row of fields of the products details should show and user will have to fill (Model1, Expiry Date1, Status1) AND (Model2, Expiry Date2, Status2) , if the user chooses 3, THREE row of fields of the products details should show and user will have to fill (Model1, Expiry Date1, Status1) AND (Model2, Expiry Date2, Status2) AND (Model3, Expiry Date3, Status3)
I have created 9 Fields:
Model1, Model2, Model3
Expiry Date1, Expiry Date2, Expiry Date3
Status1, Status2, Status3
I created a rule: if number of products = 1, hide Model2, Model3, Expiry Date2, Expiry Date3, Status2, Status3
I wanted to create a second rule: if number of products = 2, hide Model3, Expiry Date3, Status3
but an error message showed up saying that:
"Rules #1 and #2 are both 'show/hide' rules on the same field (Model3).
Only the last (highest numbered) of these rules will have any effect. Consider combining these rules into a single 'multiple condition' rule instead. more..."
how can I solve this?
Thank you
------------------------------
Sarah Eldurini
------------------------------
- Hello Sarah,
Don has a great point in regard to the architecture and if you can do that , you likely should. But if not, you will need to change the way you are thinking about the rules. Think about what conditions would fit into one rule for show/hide on each field. There are many ways to do this. Here is one example that should work if I am understanding your requirements correctly.
Rule #1
When # of products - is equal to - 1 OR 2 OR 3
show model 1
show Expiry 1
show status 1
Rule #2
When # of products - is equal to - 2 OR 3
show model 2 etc.
Rule #3
When # of products - is equal to - 3
show model3 etc.
This way, you are only applying the show/hide action once per field and you will not receive the error and the correct number of rows will appear based on the # of products they are entering.
------------------------------
Brandon Drake
JHI Group
Monroeville, OH
------------------------------