Forum Discussion

brian_s's avatar
brian_s
Qrew Trainee
7 hours ago

Dynamic Rule - Or statement?

I have been building a series of dynamic rules this afternoon and hit a snag. 

Basically, I have a list of questions that need to be filled based on location.

Each question COULD be asked in multiple locations. I went thru thinking I could create rules to SHOW the question depending on the location. My problem comes when I have several locations which is basically are the EXACT same rule for a different location. I am finding the question only shows for the highest number rule. 

I did some googling and confirmed what was happening regarding the rule number. It seems the easiest way to fix this would be the ability to use an OR statement in the condition of the rule. I see several articles mentioning the same thing, but it doesn't seem particularly clear -   I can create the initial rule, then choose ALL or ANY for subsequent rules. 

Is there no way to do an OR here?   Should I be looking at this a different way?

My example is similar to this:

Boston  Quest1 Quest2

NY  Quest2 Quest3

RI  Quest 1 Quest 2. 

If Location = Boston   Show Quest 1  Show Quest 2

If Location = RI  Show Quest1   Show Quest 2

I could combine the rule to   If Location = RI or Location = Boston or Location = NY   Show Quest2

 

 

I built it all out without the OR, but got a rule warning:

Rules #10 and #11 are both 'show/hide' rules on the same field (Ex - Schutz).

 

 

  • Yep been there, done it,  bought the T-Shirt.

    You need to write a rule per field and not a rule per Situation.  You need to "get your mind right".   Check out my Cool Hand Luke Post here:

     https://community.quickbase.com/discussions/quickbase-discussions/dynamic-form-rules-and-or/81433

    dynamic form rules and or | Qrew Discussions

     

  • Yep been there, done it,  bought the T-Shirt.

    You need to write a rule per field and not a rule per Situation.  You need to "get your mind right".   Check out my Cool Hand Luke Post here:

     https://community.quickbase.com/discussions/quickbase-discussions/dynamic-form-rules-and-or/81433

    dynamic form rules and or | Qrew Discussions

     

    • brian_s's avatar
      brian_s
      Qrew Trainee

      You know, I did come across this, and I thought about it for a while and that's when I moved on.  I have no doubt that your right that I need to get my head right, but for example in your post you say to 1. Scrap  2. Define on Paper  3. Put in with Keyboard.

      In order to do this with a rule, I still need that OR statement that doesn't seem to exist. The situation I was creating the rule for is if any of these rules are selected Location1, Location2, Location3 then SHOW THE RULE. 

      Unless you mean to do something like:

      IF  LOCATION is not Blank

      and ANY of the following are true   Location = Location1, Location =  Location2, Location = Location3

      Show  "A FIELD" and repeat this rule for each field.   This last part literally just came to me as I was typing. Im going to try it now...