How do I limit drop-down options in input field based on role?

I am building a database with a “Create User” page for my client to add their own employees. Part of this registration page is a Role drop-down input field so the manager can assign a ‘manager’ or ‘staff’ role to the new user. The issue is that I’m using a master Role Option Set as the source of the drop-down, but I don’t want the manager to be able to select roles from the option set above the manager level. How can I prevent a user from seeing/selecting a role that is not appropriate based on their own role?

Thanks!

Hi there, @j21… one way you could go is to add an attribute (number) to the option set, and assign each role a number (with higher numbers associated with the higher-level roles). With that attribute in place (which I have called level in my example), doing what you described would be as simple as this.

Hope this helps.

Best…
Mike

2 Likes

OH MY! It was that easy and worked like a charm! Thanks a million, @mikeloc!

1 Like