Make the fields only editable through the action"

Have testing with try and error to find out a way to get the required functionality to “make the fields only editable through the action”.

I believe there should be far better way, very courious how app creators are manageing. Welcome to hear your tricks.

What I wanted to control the fileds setting is to let a filed to be “editable” by action only. When the app user open up form view, then they are not able to edit, but the field value is viewable only. But through appsheet action, the field are editable.

I simply add

context(“ViewType”)<>“Form”

to EDITIF constrain and eventually I got the required result.

9 12 1,762
12 REPLIES 12

hru
Participant V

In Editable? I put FALSE.
2X_8_81e33243e0787e414d6486e9fd572f9a9fafc9dc.png

That will prevent Action from editing the field. Action will be runnable, but it end up with error, saying “Field can not be edited”.

Ahhhh, I have to avoid it then.

I am just using it for a simple app, and action is working, including changing the field in the source.
I read it somewhere about this FALSE, that’s why I implement it.

Yes, putting FALSE is to prevent the field from being updated by user from the form, but it also prevent apphsheet action to update as well.
Thats why I have been thinking of workaround and come up with this tricks, but probably there will be another way to do the same job.

I set Editable? to the expression, FALSE, as @Heru suggested. It prevents all user edits but allows app edits, such as by actions. Note that this is different from setting Editable? to OFF, which prevents all modifications.

Hi @Heru @Steve

Thank you for your advice. I created create new app from scratch and tested “false” method, and actually it worked.
Thank you again.

That is a helpful tip. But doesn’t it make sense to have the editable setting ONLY apply to the user editing it and not actions or app formulas?

In earlier versions of the app editor, the setting was Read-only rather than Editable?. It’s intent was to make the column entirely unmodifiable, even by the app. As a developer, I see a value in being able to prevent all modifications, including accidental ones. It’s also has good security potential. I myself am happy with the current approach, but wish there was a better way to communicate how it works…

Actually, it is helpful. That’s exactly what I was looking for.

I don’t want the user to edit the field. But I need my actions to run and edit the fields as programmed.

In my case is useful.

I really needed this, thank you!

Although I think it's not very intuitive, almost impossible to guess without forums.

 

I just add this code in conditions of edit if:
USEREMAIL()=noemail@gmail.com

This is precisely what I was struggling with!

Thank you @Koichi_Tsuji what a clever way to resolve this issue. I was on the right path trying different expressions using the CONTEXT() function but I couldn't really get there.

Top Labels in this Space