Field Selections Based on Permissions

I have created a help desk for the library I work at. Right now when a ticket is submitted, it automatically sets the Status field to In Progress. At the moment, there are only two field options for Status, In Progress and Completed. Library staff (that submit help tickets) and Service Staff (that answer the tickets) can change the Status. However, Service Staff have asked if I can have a third option, Awaiting Information, that ONLY Service Staff can set the ticket to, but Library staff can see when they look at the ticket details.

Is there a way to limit (or expand) the Status field options based on the logged-in user’s permissions/user role?

Hi, Jordan!

Thank your for posting your question here!

This is a really great question, and I’ve searched through the forum and have found a topic posted with the information you are looking for: How to filter out options in a multiple choice list based on user role?

As Julian mentions in the thread shared above, I suggest to avoid using JS and let the database do what it does best. :slight_smile:

To achieve this, you can set the Multiple Choice field up as a Connection field instead and have field(s) in the “looked up” table which you can then use to filter the dropdown on Form view(s) as you need. So, you would need to create a new table that has the three options of “In Progress”, “Completed”, and “Awaiting Information” that you would connect to the table that the Form view(s) in your Live App would be creating records for.

Sounds confusing? I have created a simple app to display this setup by sharing a few screenshots in case having a visual reference helps.

Status table:

Tickets table:

Example Status field input setting in a Form view:

Live App:

Then, for your Service Staff members, you could create a page that only gives permission to access to Service Staff user role Accounts that will allow them to edit the records’ Status value.

Example screenshots:

For the Service Staff scenario of them editing, this can be done a few other ways, such as, having a view on page to edit a Ticket record that is hidden for users that have the “Library Staff” user role by adding a Page Rule.

I hope this helps and guides you in the right direction. However, if you are unsure about how to accomplish your goal after reading this, please reach out to our support team! They would be very happy to help you create this workflow and would be able to take a look at your current app and the way that you have already setup your tables, user roles, pages, etc.

You can reach out to them via the chat widget in the Builder, by submitting this form, or by emailing support@knack.com.

Thank you again, and have a great rest of your week!

2 Likes

Another way might be using 3 fields:

Multiple Choice: Library staff Status
In Progress
Completed

Multiple Choice: Service staff Status
In Progress
Completed
Awaiting Information

Short Text: Status

Only allow Library staff to access a page with Library staff Status.
Only allow Service staff to access a page with Service staff Status.
For viewing purposes allow each Staff to view the Status field.

Use pages rules to populate the Status field from the Multiple Choice fields.

Make sense?

Worked like a charm, thank you! I tried searching the forum and got a few posts (that involved a lot of JS) but somehow did not get the post you referenced. I still appreciate your long explanation.

1 Like

You are absolutely welcome! I’m really glad that helped you get to the solution that you needed! :clap:

Have a great rest of your week and happy Knack building! :slight_smile:

2 Likes