How do I remove the edit buttons to not show up for regular users and only for admins?
I’m not sure if there’s an easier way to do this, but here’s how I do it:
Go to Behavior
Then to Actions
Find the Edit action that’s associated with the database that you want to halt edits (click to expand the Edits)
Scroll down to Behavior where it will read: “Only if this condition is true”
Click to add: USERROLE() = “Admin”
You can also add USERROLE() = “Admin” to any column in the Editable If area
So, when you add a table into appsheet it presents you with the types of data operations that can be done to the rows of the table.
These option are Add, Update, Delete and Read.
Update is associated with the Edit actions.
You can place a formula instead of choosing a specific list of types so that the results of the formula corresponds to each or more of those options.
Thus you can set tables to be fully editable if user role is admin and read only if user role is default.
These option will add or remove the edit, delete and add operations throughout the app.
Hope that gives you some pointers to implement your own logic on your tables.
I suppose you could use the same formula idea to even more finely control the “editability”, at the column level. Make some columns editable by ‘basic’ users, and other only editable by an ‘admin’.
I confess I haven’t tried, but it looks that’s exactly why a formula could be typed in there…
- Edit the entire column
- Scroll down to the 'Update Behavior] section and expand it
- Click on the icon of the funnel to the right of the [Editable?] field
That turns the [Editable?] checkbox into a formula.
Thank you so much for the information! I was able to get in there this morning and implemented the suggestion, and everything went smooth.
I can’t thank this community enough for the help I received on getting my app up and running.