# Multi-option dynamic rule based on user group

• 0
• 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.

• 150 Points

Posted 2 years ago

• 0
• 4,022 Points
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!
• 150 Points
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.
• 31,698 Points
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)