Interesting case of overwritten records

Hello Appsheet Community!

I have an interesting case.

I have an app that maps batch codes to Best Before Dates through a lookup table.

I noticed that when I filled in the form, I accidentally entered a key value which does not have a corresponding value in the lookup table. Naturally I get a blank output where I am supposed to get the best before date.

I realise the mistake and try to fix it by entering the correct batch code. However, when I enter the batch code, I can see that the lookup table spits out the correct value into the best before date field. However, as soon as the app syncs, both the key-pair value gets erased/overwritten by the first value I had entered by mistake. No matter how many times I try to fix this, it keeps reverting to the old state. I need to delete this record and add it again. Why does this happen?

Screenshots below:

Erroneous state

Paras_Sood_0-1666239107202.png

Trying to fix the form by editing the record:

Paras_Sood_1-1666239134973.png

Temporary fix before sync

Paras_Sood_2-1666239161379.png

Back to erroneous state after sync:

Paras_Sood_3-1666239183450.png

Column Datastructure

Paras_Sood_4-1666239335750.png

Formula used for lookup (works absolutely fine when there are no errors

 

LOOKUP([_THISROW].[Batch Code],"Batch Code Map","Batch Code","BBD")

 

Formula, initial value are blank for [Batch Code] 

Initial value is blank for [Best Before]

Even if I go to the backend (Appsheet database) and update the batch code there, the best before date always get overwritten as shown above. how can I fix this

UPDATE: I can't even delete those records from appsheet database through appsheet

Paras_Sood_0-1666240307218.png

Not sure why appsheet thinks that I am logged in to the appsheet database through another session even after I have closed all sessions and restarted my computer.

Paras_Sood_0-1666241643787.png

Solved Solved
0 2 70
1 ACCEPTED SOLUTION

At first sight:

  1. You are using AppSheet Databases, which is a preview/beta feature.
  2. Don't change the key column. Use the corresponding "Row ID"

View solution in original post

2 REPLIES 2

At first sight:

  1. You are using AppSheet Databases, which is a preview/beta feature.
  2. Don't change the key column. Use the corresponding "Row ID"

I changed the key column to Row ID and it fixed it for me. Thanks!

Top Labels in this Space