Can the selections from a multiple choice Text field be narrowed based on logged in user's role?

  • 1
  • 2
  • Question
  • Updated 1 year ago
  • Answered
I have a Tasks table with a field called Task Name set as a Text - Multiple Choice field. In the Users section I have defined two different Roles. When a User clicks on the Task Name field to select a choice, I want them to only be able to see tasks that apply to their Role and not a huge list.
Photo of Jennifer

Jennifer

  • 182 Points 100 badge 2x thumb

Posted 1 year ago

  • 1
  • 2
Photo of Kingsly SD Samuel

Kingsly SD Samuel

  • 776 Points 500 badge 2x thumb
I have asked the same question before, and have been told that is not an option. Not sure whether the QB team has updated it in any way recently. But, I agree. This will be a useful option to have.
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
You will want to create a "Task Options" table.

Connect it to your "Task" table, where each Option has many Tasks.  

Then you have essentially created your options dropdown. 
Each Option will need to be its own record, but here is where you adjust the 'visibility'.

On the Options table, you will want a 2nd field called "role".  Then have a multiple choice for your 2 roles.  Create all the Options with the appropriate role assignment.

Then in the Roles & Permissions setting for those two roles, make the view option a custom rule, to only show when the field 'role' matches 'x'.

Now you have dropdown that is filtered by roles.

Cheers,
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
Matthew, how does this work when a user views a record which someone else in another Role has entered.  I would be concerned that the drop down would be blank when viewed.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
If its a formula text field, there is an option on formula fields to ignore "sub field permissions". Not sure if that solve the problem though.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
Actually maybe it does solve the problem.  You could have a formula  be just a mirror of another field and ignore sub field permissions.  this question has been asked before and I have encountered the problem myself and came up with very messy solutions driven by form rules.  It deserves a solution built as a demo app and put into the exchange :)
Photo of Jennifer

Jennifer

  • 182 Points 100 badge 2x thumb
Thanks for everyone's help on this. I want to try the option with a formula text field, but I'm not sure where to start??
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
I have re-read your initial question.  Do you have a table of Employees who have Roles?  If you did then you could look up that Role to the Task Table.

Then, you can have a table of Choices for the Task Name with an extra column for the Role.
 
Then, you can set up a conditional drop down for the task name which is conditional on previously having chosen a Role.

So this means that if your current multiple choice field is driven off a basic list of choices in the field itself, instead, then will need to be chosen off a table.
Photo of Jennifer

Jennifer

  • 182 Points 100 badge 2x thumb
Thanks, I think I have it working now.