Sync before adding a row to a table

Hello Community.

I have a customer app, where all my employees can add new customers and I have the following problem.

I set the action for adding a new row to: linktoview("Kunden_Form") & "&at=" & ENCODEURL(NOW()+1)

so that every employee, that would add a customer, gets a forced sync, before adding a new row to the customer table.

I have also an app, that a new customer can add his data by himself and the following problem appears:

On 23.01.2024, a customer has created a new row to the customer table and everything works fine.

On 29.01.2024, an employee added a new customer to the same table and appsheet overwrites the row, that was created by the customer. 

How can this happen? the action: linktoview("Kunden_Form") & "&at=" & ENCODEURL(NOW()+1) should force a sync to update the table for my employee before adding a new row, but it seems like it doesn't work.

Maybe someone can help, cause i can't find the problem.

Many thanks in advance and nice greets from Austria.

0 8 103
8 REPLIES 8

Not sure you need the ENCODEURL(). I usually just use (NOW()+1) , but I can imagine that is the issue.

Are you using Desktop Mode?

many thanks for your response.

yes, we are using the new desktop mode and on other apps, i have solved the problem with this formula. can you confirm that your solution work on the desktop mode and do you know the difference that your formula is making in the backend, compared to my solution?

many thanks in advance

My only idea would be to try and revert back to the non-desktop mode and see if your feature works again. If so, it is a bug with desktop mode and you will need to report it.

i dont think that the desktop mode is causing the problem. on other apps, this problem dont appear. maybe its, cause we generate the row-id and thats the customer number.

i will try, if i can switch to a uniquid for customer number.

Any chance you are using security filter and when your employee added that row, he/she didn't have that row in the device even with the sync?

we dont set security filter in that table. the best solution would be, that appsheet would sync, bevor adding a new row, as programmend in my formular. i would try it with landans suggestion

JSO
Silver 2
Silver 2

In tests that I have carried out with 2 devices registering simultaneously, with registration ID of type UNIQUEID(), it has been impossible for me to get one user to overwrite the registration of another (both are created without problems).
If I use a sequential ID number generated in AppSheet, data loss occurs. (In this case it is corrected by creating a column in Google Sheet - not ID - with a formula that calculates the sequence in the Google Sheet itself:  IF(RC>0,RC,IF(ISNUMBER(R[-1]C), R[-1]C+1,1)) )

 

many thanks for your help. i will try to change the row-id and came back if this solution work. it would take time to try.

Top Labels in this Space