Forum Discussion

DavidCowles's avatar
DavidCowles
Qrew Trainee
8 years ago

Multi-option dynamic rule based on user group

On the form "Tests", I have a field ("Vendors") with dropdown: Contractor 1, Contractor 2, Contractor 3, In-house.

I have also set up User groups for each of the Contractors. (user group 1, user group 2, user group 3)

The section I want to Show/Hide is "BVA$"  

What I want:

If field "Vendors" = Contractor 1 and the user is in "user group 1" then show the BVA$ section. 

If field "Vendors" = Contractor 2 and the user is in "user group 2" then show the BVA$ section.

If field "Vendors" = Contractor 3 and the user is in "user group 3" then show the BVA$ section.

Basically if the Vendors does not match the user group then hide the BVA$ section so each Contractor doesn't see each others $$ but I can still see them all. 

I have tried to set up a dynamic rule for each but i get a rule warning about combining them all into one rule. 

Please Help!!
  • Because you would need to create one form rule, I would create a formula checkbox field (call it: Show BVA$ Section) and use the checkbox as the criteria for the form rule. 

    formula might look like:

    if([vendors]="Contractor 1" and [user group="user group 1",true,

    if([vendors]="Contractor 2" and [user group="user group 2",true,

    if([vendors]="Contractor 3" and [user group="user group 3",true, false)))


    let me know if that works for you.

    Good Luck!
  • That is a great idea, however the "user group" is not a field that can be called upon in a formula. Unless there is way to pull live the current user and group within the formula. 
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    Does your "Contractor" have a user field associated with it?  What are the relationships currently surrounding this scenario?

    You can pull the current "User" with a User() formula, and then compare that to the contractor user (if you have that relationship set up)