Dynamic Form Rule to show/hide multiple fields based on one Multiple Choice field error. I'm unable to figure out how to set up multiple conditions.

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
Hello,

I have a Multiple Choice field (DLC) with 1,2,3,4 and 5 as the values. I was hoping to set up a Rule that would show/hide certain values based on the number selected. 

For example.

When

'DLC' is equal to '1'

Action

Show 'DLC1 Summary'

Show 'DLC1 Date'

Hide 'DLC2 Summary'

Hide 'DLC2 Date'

    ''     ''

Hide 'DLC5 Summary'

Hide 'DLC5 Date'

Which worked fine until I then copied the Rule, and modified the new one to read....

When

'DLC' is equal to '2'

Action

Show 'DLC1 Summary'

Show 'DLC1 Date'

Show 'DLC2 Summary'

Show 'DLC2 Date'

Hide 'DLC3 Summary'

Hide 'DLC3 Date'

    ''     ''

Hide 'DLC5 Summary'

Hide 'DLC5 Date'

The logic seems to be fine, but Quickbase believes that I should be able to acomplish this same thing using 'multiple contidion' rule instead. Apparently I'm unable to use "show/hide" rules on the same field, in this case "DLC". Is there an alternative? or option in Quickbase I didn't notice?

Thank you in advanced
Photo of Carlos

Carlos

  • 0 Points

Posted 2 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,278 Points 50k badge 2x thumb
You need to turn your thinking upside down.

Instead of what you have, make a single rule to deal with each field that needs to be shown or hidden.
ie, answer the question as to when you want DLC1 Summary to show.

Then go onto to consider your next field.  If the rule is IDENTICAL, then add that same field to the Rule 1.  Else, make a new Rile to exclusively deal with when to show or hide it.
Photo of Carlos

Carlos

  • 0 Points
Hey Mark!

Thanks for that, the nudge helped me think about it differently. For anyone interested, or finding themselves with a similar problem, this is what I ended up doing to fix it.

Rule 1

When
      DLC > or = to 1

Action
      show DLC1 Date
      show DLC1 Summary

Rule 2

When
      DLC > or = to 2

Action
      show DLC2 Date
      show DLC2 Summary

Rule 3, 4, and 5 have pretty much the same logic

Note that I just didn't worry about hiding the other fields, I failed to realize that its done automatically based on the conditions.

Best,