Multi-option dynamic rule based on user group

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • In Progress
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!!
Photo of David Cowles

David Cowles

  • 150 Points 100 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
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!
Photo of David Cowles

David Cowles

  • 150 Points 100 badge 2x thumb
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. 
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
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)