How to stop a basic user from editing any fields

How do I remove the edit buttons to not show up for regular users and only for admins?

0 6 578
6 REPLIES 6

TJCobb
New Member

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.

@Scott_Robinson, @nadim_dayoub , I like the idea of the formula on the table itself. I never realized formulas were offered there.

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…

  1. Edit the entire column
  2. Scroll down to the 'Update Behavior] section and expand it
  3. Click on the icon of the funnel to the right of the [Editable?] field

That turns the [Editable?] checkbox into a formula.

TJCobb
New Member

Visualized:

Steve
Platinum 4
Platinum 4

Very well answered @TJCobb, @Scott_Robinson, and @Arnaud_Boucherat!!!

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.

Top Labels in this Space