Forum Discussion

brian_s's avatar
brian_s
Qrew Trainee
10 hours ago

Simple Dynamic Rule Question

I am having a bit of a problem building a dynamic rule. 

I have a basic app, 2 tables.   LOCATION and WALK.  The location table is basically 2 important fields - Site and Area...  Site would be the actual location of the walk, where area is a sublocation.   So like -    Site = Boston_Office  Area = Cafeteria.  The WALK table is a list of questions that we ask when doing a walkaround. These questions can be slightly different per site/location. 

There can be multiple area's per Site.  In the app, the dropdown is LOCATION where we can choose the combined SITE-AREA. When I select it, it shows both the SITE and AREA in seperate boxes. The relationship is one LOCATION to many WALKS.

My question is this. I am trying to show/hide fields based on location. I customize the WALK form, and go to set up a dynamic rule. I can see a SITE field in the list of fields I can use for a rule. I wanted to do a rule   IF SITE IS NOT EQUAL TO Boston_Office then HIDE field(s).   My options when I try to do this, is   "is equal to" and "is not equal to".  I assumed I could type in "Boston_Office", but the rule doesn't fire.

There is also a field called Location - Site where I if I select it, I get an additional option called BROWSE CHOICES and I can select what ends up being a SITE and AREA combo and by using this, the rule works.   This would mean I would need to set up a rule for each Site-Area combo for this to work. 

Any thoughts what I am doing wrong where I can't just use the SITE field so I can create one rule for all Boston_Office related fields?

 

 

 

 

 

  • To me, it sounds like you need to setup a conditial dropdown 
    Site and Area should be pulled out in to Tables of their own instead of fields on a single Table.

    Then Relate Sites can have many Areas

    Then Location  can go away. (I don't think you'd need it)

    To Confirm, when you say
    "The relationship is one LOCATION to many WALKS."

    Would it be the same to say a Walk can have many locations?

    If so, Then you should also do Walks can have many Sites & Walks can have many Areas. 
    Then use the Conditional Drop Functions of the Key Field (Related Area) of the Relationship between Areas and Walks.
    You could then you Related Record ID's to Filter Forms.
    IF the Related Site 1 and Related Areas related to 1 are say (3,8,10,12)
    Show these Questions, and so on.

    I'd be happy to schedule a meeting with you to discuss how all of that would work.

     

    • brian_s's avatar
      brian_s
      Qrew Trainee

      The previous commentor solved my short term problem, but if I am following you, I think your suggestion may simplify this further. Let me give it a crack.   I appreciate the suggestion. 

    • EnderTaylor's avatar
      EnderTaylor
      Qrew Cadet

      IF a Walk can have multiple sites, I'd also venture to say you probably need to create a Many to many relationship setup.
      So  in addition to the conditional drop down you would also create a Table Called something Like Site - Walks.

      And relate the Table Walks to Site- Walks where Walks can have many Site-Walks

      and relate the Table Sites to Site-Walks where Sites can have many Site-Walks

      This "Joining Table" Would Function as the Main table your users use, and the other tables would operate more in the background. 

      This would allow you to create many Walks that are variabled based on Which Sites and Which Areas are addressed in a single walk.

       

  • From your description, it should work.  Are you sure that you are typing in the name of the Site exactly correctly?  Also, you will need to have the Site field on the form, even it it's placed in a hidden section.

    • brian_s's avatar
      brian_s
      Qrew Trainee

      You nailed it.. I needed to add SITE to the form which I hid immediately. Its now working as I was hoping..

      Thanks!