Discussions

Expand all | Collapse all

Multi-option dynamic rule based on user group

  • 1.  Multi-option dynamic rule based on user group

    Posted 03-27-2017 22:21
    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!!


  • 2.  RE: Multi-option dynamic rule based on user group

    Posted 03-27-2017 23:45
    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!


  • 3.  RE: Multi-option dynamic rule based on user group

    Posted 03-28-2017 01:20
    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. 


  • 4.  RE: Multi-option dynamic rule based on user group

    Posted 03-28-2017 03:36
    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)