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 564
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