Virtual Column -IF

Hi, I have a doubt about a formula. I try to create a schema of status for Skid or Trucks, depending on the type is a status. example:

if Type storage is Skid the status must say “Material in Storage”
If Type Storage is Truck status must say " Truck in the Yard"
etc etc the formula is this

3X_e_3_e365062f196aaa0197e9aedf7f24f99282c45490.png

but when add a register and the first condition is complete don’t show in row Status


3X_2_c_2c9e380eb4a537d406a8e79afc7dcebaa6b30408.png
the status shows correctly
3X_4_e_4e027bf11943ba619f0953be1d02cc51ee7d20bd.png

but when save …apparently, all is ok but a few seconds the status disappear

3X_8_7_8714542366a5cd5f4a02febf00dce3d6caf572c2.png

3X_3_4_342e9ac5e9c7c17863928c110d839291164597e4.png
I check my formule a don’t know why take a last criterion " "
3X_d_4_d42588daefa8791ef6a77b4cd84bda667f10f1d3.png
3X_3_6_36bd0af67cc66973dec9be4d3f0a3a63965ff68a.png
3X_6_a_6a17b91ca15b6682d543809ae3cb56461b8ba586.png

Solved Solved
0 10 150
1 ACCEPTED SOLUTION

I have changed the original legend called “Material en Bodega” to “Almacenado en Bodega” and it worked !!

3X_9_1_912ba96fc8cdc29d9506c895755a5bbe4d33fb61.png

I still don’t understand what happened

View solution in original post

10 REPLIES 10

Perhaps you have a data change action that’s resetting it?

I suppose but the stranger is this app just started to develop. and not have any data or actions

Instead of using so many if condition you can use ifs here

For example ifs ([storage type] =“1” ,[STAUTS]=“1”,
[storage type] =“2” ,[STAUTS]=“1”)

Try in this format

Change the formula for ifs and happen same…
simplify the formula so that it only shows the first two statuses

if for example makes the entry “Cajas de Zinc” the status shows the correct legend…


3X_5_8_585070919c715d588f874668aa631261e72871de.png

but is change to “Material en Bodega”


3X_9_4_9497cc4643fec0460563f98093aac0cf18b6dfc2.png

I have changed the original legend called “Material en Bodega” to “Almacenado en Bodega” and it worked !!

3X_9_1_912ba96fc8cdc29d9506c895755a5bbe4d33fb61.png

I still don’t understand what happened

Aurelien
Google Developer Expert
Google Developer Expert

Hi @daniel_sanchez
Do you have a conflict with “initial value expression” vs “app formula” ?
You should have only one, but not both fields completed.

Is a virtual Colum, is not supposed to have Initial value expression?

You are correct, I was assuming you were calculating a real column.

So, that means one of the input for your calculation is evolving when syncing.
I suggest you have a look to the expressions of each column input, such as [Tipo de Almacenaje] , [Fecha de Envio], and so on.

Typically, with virtual column you have (it is probably not accurate but that the behavior I see from my experience) :

  • immediate calculation
  • writing down values on your database
  • syncing back the values written
  • actualize virtual columns values, depending on your database actual values

So, maybe one of your form values is not being written properly. Can you check these ?

Aurelien
Google Developer Expert
Google Developer Expert

About the last criterion: if you write “TEST”, the “TEST” remains ?

“About the last criterion: if you write “TEST”, the “TEST” remains ?”

yes, so this confirm that the formula works but no criteria is valid

Top Labels in this Space