Initial value

Hi everyone, 

I'm developing an App for business use. I have a column (x_name) that should automatically change its value when certain conditions are met — for example, when fields like Pool or Nucley are updated. 

It works inside a form view: if I open the form and change values, the correct value appears in the x_name field. However, if I view or edit the data from a table view or Detail View, the value doesn't get saved unless I manually open the form and click “Save.”

This behavior didn’t happen before — in older views I built, the Initial value updated and saved automatically when the conditions changed, even without opening the form. Now, it seems like the value only updates visually but isn’t saved to the database unless the record is saved manually. I tried with a reset if and to change initial value but its so strange.

Can someone help me?

Thank you.

0 14 193
14 REPLIES 14

Aurelien
Google Developer Expert
Google Developer Expert

Hi @aleeee 

From my understanding, you are willing to update a calculation after an update on your record.

This can happen with a FORMULA expression, not INITIAL VALUE.

You may want to consider moving it into the FORMULA field?

hi @Aurelien, I know but i cant move it into an app formula because adminstration office have to change it. I dont know where is the problem because I do other steps with this type of condition and all its okey.

Aurelien
Google Developer Expert
Google Developer Expert

@aleeee wrote:

I dont know where is the problem because I do other steps with this type of condition and all its okey.


Do the other steps keep working as expected? Is there something in the Reset_if, Valid_If, Editable_If condition that might be different?

Also, can you share a screenshot of your editor with this column's settings?

hi @Aurelien , sorry if I don't answer but it was a national holiday in Italy. Anyway, other steps work as I want. I share a screenshot of column settings. The formulas into the initial value or reset if are correct infact I see that the value "requested" enter in the general view but after five second it disappers and I see the value only  in the form when I click the action "Edit". I hope that you have understand the problem, which is unusual. 

thank you.1.png2.png3.png4.png5.png6.png

Check to see whether your Reset on Edit and Your Editable_If formulas are not in conflict...

hi scott, I check all things and I change short part (for example I delete the condition of edit if and nothing). 

Aurelien
Google Developer Expert
Google Developer Expert

Hi @aleeee 

Is it possible that a bot would update the value after a change?

Did you check the audit log of your app when performing a change with it when you see the 5-seconds delay disappearing ?

Aurelien_0-1745908011666.png

 

hi @Aurelien, no it's impossible that a bot change the value bc my bot send only email. anyway i try the audit log.

hi @Aurelien i see the audit log but all is okey i don't understand where is the problem. I change again the initial value and yesterday I wrote to gbt the problem and it say to do a bot for fix the value when tech_add=yes ecc... but i prefer solve the problem with initial value or other things. do you have an email where i can write to you because i open the ticket on appsheet but there are the new value, i need to do a videocall with someone for explain better the problem. who can I contact?

Aurelien
Google Developer Expert
Google Developer Expert

Hi @aleeee 

Just in case, would you mind sharing the expression used in Initial value and Reset_if?

You may want to use this to insert code:

Aurelien_0-1745911703931.png

 

@Aurelien this is the code:

reset if - user account

OR(AND([user_account]<>"Created",[user_account]<>"Master"),ISBLANK([user_account]))

initial value

IFS(OR([Nucleos]=TRUE,AND([tech_add]="YES",[create_account_user]=FALSE)),"Master",AND([create_account_user]=TRUE,[tech_add]="YES"),"Requested")

IF(OR(AND([Nucleos]=TRUE,ISBLANK([_THIS])),AND([tech_add]="YES",[create_account_user]=FALSE,ISBLANK([_THIS]))),"Master",IF(AND([create_account_user]=TRUE,[tech_add]="YES",ISBLANK([_THIS])),"Requested",""))

EDIT IF

AND(ISNOTBLANK([tech_add]),ISNOTBLANK([create_account_user]))

I send all types of formula that I used for the initial value, so i try all of this and in every case i have a problem. can I contact ypu in private email?

 

 

Hi @aleeee 

Just re-writing for easier reading:

Reset_if

OR(
  AND(
    [user_account]<>"Created",
    [user_account]<>"Master"
  ),
  ISBLANK([user_account])
)

Initial_value

Expression1

IFS(
  OR(
    [Nucleos]=TRUE,
    AND(
      [tech_add]="YES", 
      [create_account_user]=FALSE
    )
  ),
  "Master",
  
  AND(
    [create_account_user]=TRUE,
    [tech_add]="YES"
  ),
  "Requested"
)

 Expression2

IF(
  OR(
    AND(
      [Nucleos]=TRUE,
      ISBLANK([_THIS])
    ),
    AND(
      [tech_add]="YES",
      [create_account_user]=FALSE,
      ISBLANK([_THIS])
    )
  ),
  "Master",

  IF(
    AND(
      [create_account_user]=TRUE,
      [tech_add]="YES",
      ISBLANK([_THIS])
    ),
    "Requested",
    ""
  )
)

 Editable_if

AND(
  ISNOTBLANK([tech_add]),
  ISNOTBLANK([create_account_user])
)

 Allow me a moment to have a look.

I suggest to stick to Community posting (no PM), because other people may have additional ideas, such as @scott192 did ! 🙂

thank you @Aurelien, I suggested using a private message bc this type of error is unusual and maybe its diffuclt to explain

Aurelien
Google Developer Expert
Google Developer Expert

Hi @aleeee 

I have a doubt: which column is being in cause here? I mean, what is the colunm name attached to your screenshot provided earlier?