Restrict drop down values based on roles

  • 2
  • 2
  • Question
  • Updated 3 years ago
  • Answered
I have an approval form which has a status field. I use the status field to trigger notifications. But the issue is that drop down values can be misused by first who is supposed to select only particular value ant not any other values. How could I restrict these values by role or indeed any other measure.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb

Posted 3 years ago

  • 2
  • 2
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 69,784 Points 50k badge 2x thumb
I will make this a comment as I don't believe that there is a good solution other that what I will suggest.  But we will see if any one else chimes in.

I suggest that you break up your status into two separate fields, one with access to all, and one with form rules and/or field level permissions to control access to view only at the restricted Roles.  If you like, you can then have a [Status Final] for a formula text field to resolve the two status fields into one calculated Status.
Photo of Ryan

Ryan

  • 88 Points 75 badge 2x thumb
I have a similar situation wherein a "requester" enters information and needs the ability to move the request from a "draft" status to a "submitted" status.  There are multiple other statuses, but the requester should not be able to choose those ("In Progress", "Cancelled", "Complete").


My solution was to make the status field read only for the requester's role, and add a checkbox beside the status field.  Checking the box fires a dynamic form rule that changes the status.  My role has full control of the field and can choose any status.


It sounds like this would be one way to handle your situation as well, since the first person is only supposed to be able to move it into a single other status. 


This would not be an ideal solution if you needed to restrict a long list of options to a shorter list that still has multiple options because you would have to create a separate checkbox for each option you want the user to be able to choose.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
Thanks a lot.  I took a more tortuous way of achieving this.  But it works. Not too sure how to add a screenshot to this thread to what I did in the dynamic form rules. But in nutshell I created a rule so that action always falls back to the required status if the there is a certain role using the form. But thank you kindly for sharing your thoughts and a good alternative solution.
Photo of Ryan

Ryan

  • 88 Points 75 badge 2x thumb
Your method works too for simple forms with few rules, but be very careful.  I have created forms with hundreds of fields and many dozens of rules in them; where entering data in one field triggers a rule that changes a 2nd field, and that field also triggers a rule.  These cascading rules only run through 2 levels, then processing stops (for performance reasons).  Note that this also applies to formula fields (and lookup fields and cascading dropdown boxes), so having a dynamic form rule trigger based off of the results of a formula field that is dependent on other fields on the form also hits this limitation.  

You can probably see where I'm going with this... if you do something similar and someone edits a field that triggers 2 or more rules in a cascade, it could potentially halt rule processing on the form long enough for them to change the value in your "action" field and save the form with an "action" they shouldn't be able to select.

I see this behavior happen all the time on my forms, but I'm an overly complicated person and usually end up with overly complicated forms.  So please don't redesign your solution based on my response, but just be aware of it in case you run into a similar situation in the future.

Cheers!
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
You are absolutely right and I can now understand the issue I am facing with an i\unrelated issue where multiplel rules are in action. I will definitely work off your solution. Many thanks,