Can I automatically calculate a number ONLY when the new form entry is first created?

My Safety Inspection App have construction sites that may be inspected several times.

Each time a construction site is inspected, a new entry is created for the new inspection, but it reflects the number of the inspection of THAT site.

So if it’s the 4th time I am inspecting site number 413, it should show Site 413 Inspection 4.

So far so good. I got it right by two different methods (counting all previous entries with site number, or getting the max number from the inspection counter

of that site (so if I have 412=1, 413=1, 413=2, 413=3, 412=2 and I open a new 413 inspection, it will find it’s maximum number is 3 and will add 1 giving me the number 4)…

My problem… is when editing. So the form was saved and I have: 412=1 413=1 413=2 413=3 412=2 413=4

Now I want to edit form 413=3. I edit it and the number changes to 5 (either it finds the maxium number of 413 forms was 4 and adds one, or it counts all 413 forms (4 saved) and adds one.

Tried to block the change with editable_if

to no more than 2 seconds after entry creation datetime.

Well, no use. It blocks editing, but not automatic change BY AppSheet formula.

Anyway to freeze the calculation of that number after I save the entry for the first time?

Btw… while when editing a form entry I do not want that number changed… I would like to ALLOW the number to be changed IF they change the Construction Site number. (let’s say the technician by accident made an entire form with the wrong number of a nearby construction site. Instead of having to do an entire new Inspection, he could just change the construction site number… but then, the number of the Inspection should change too.