Looking for a solution. I have a field called “Status” (enum, Pending, Declined, Approved)
How can I hide the “Approved “ button unless the user is the employee?
I tried creating a separate field called “Approved” but it does sort and group properly on the Deck view.
Any idea as a work around appreciated.
Please post such questions in the “Q&A” section.
Since you are referring to role based requirement, we presume that you have a Users table with one row allocated for each app user and it also contains the email column [Email] that has user’s email and the role column [Role] of the user.
Then the valid_if expression for the [Status] column can be
IF(IN(USEREMAIL(), SELECT(Users[Email], (“Employee” = [Role]))),
LIST(“Pending”, “Declined”, “Approved”),
LIST(“Pending”, “Declined”)
)
Relevant help articles:
Limit users to their own data - AppSheet Help
Drop-down from Valid_If - AppSheet Help
For a compact expression for selecting various column values of a Users table based on logged in user, and user based system, please refer the following epic tip
Current User (Slice) | How to conform your app a… - Google Cloud Community