Restrict Editing When Initially Allowed

Hi,

I have created a button that sets the time for “arrived on site”. This is on the _Details screen.
The edit screen(_Form) is used to upload photos. I have restricted everything else except the “arrived on site” time.

However, when on this editing screen. The “arrived on site” can be changed.
I don’t want to allow this to be changed once it has been set.

I want to log the time and not have it changed to hide lateness.
I have tried to not allow editing of this cell but this errors the app.

The only time I want this cell to be edited is when the button is pressed as mentioned above.

Is it possible to restrict the editing on the edit (_Form)?
Or just allow the button to be pressed only once?

Thank you.

0 2 184
2 REPLIES 2

MultiTech
Participant V

Indeed my good sir! Check out the function CONTEXT(“ViewType”); you can restrict things easily using that.


Inside the “Edit_If” space for the field you’re talking about, insert the following formula:

CONTEXT("ViewType") <> "Form"

MultiTech
Participant V

PS: I would actually advise the addition of an additional field: Status

For this column, use an App Formula to automatically set it’s value; you can create nested IF() statements that follow the standard flow of your workflow and look at specific data to verify certain criteria have been met (or not).

Something like:

IF(isblank([Arrival_Time]), 
  "Pending", 
IF(and(
  isnotblank([Arrival_Time]), 
  [Arrival_Time] =< [Projected_Start_Time]
  ), 
    "On-Time"
"Late"
))

It’s from this field, and it’s “intelligence” that you can base other things off of - like the editability of fields, whether a field should be seen or not, etc.

Top Labels in this Space