Certain fields/columns not being synced through custom form.

I have 3 fields/columns (1 Date, 2 Texts) controlled by InitialValue and Reset On Edit.

The 3 fields reset to their initial value if certain forms are opened (achieved through action) and their initial value is based on the form that is opened. Simple enough and appears to work (after saving the form the 3 fields show the correct values). The problem appears to occur at sync, looking at the audit log, the new values aren’t being sent. This is only effecting these 3 fields, all other fields update correctly when using the custom form(s). The fields work correctly when using appsheet’s default edit form.

Any information would be greatly appreciated. If more information is required let me know.

Thank you for any help.

1 Like

Sent? What do you mean? And what “new values”?

Did you confirm that the values are saved to the datasource - not just shown on the screen?

When you Sync, all it does is retrieve the values from the datasource and/or recalculates Virtual columns. If the values are changing when you Sync that means either:

  • the values you thought were saved didn’t make it to the datasource
  • they are virtual columns and some calculation is changing them
  • there was a background process (automation or script) that changed the values AFTER you considered them updated from the Form.

I suggest running the test again. Wait a couple of minutes before Syncing and then re-confirm the datasource has the correct values. Then Sync. Do the values still change?

1 Like

Apologies @WillowMobileSys , a lot of the terminology I used was technical.

By “new values” I’m referring to what the column(s) of the row now contain (their value), regardless if it’s a number or text, to keep it simple, if in the datasource it’s a “1” and I change it to “2”, its new value is “2”.

In regards to “sent”, devices (computers, tablets, phones, etc) send data to and receive data from the server (appsheet’s devices).

This is false, in general “sync” refers to two or more datasets (in this case, server and local) matching each other, “in-sync”. To achieve that, both datasets need to send and receive updates from each other. “One-way sync” does exist but not in appsheet.

Yes, I have checked this with the audit log, the server (appsheet) doesn’t receive the values, it is only sent a record which contains the 3 columns that wont change and the other columns that can be changed. Which tells me that at some point between after saving the form and sending the record to the server, these 3 column’s values are reverting back to what they were before the form was opened. It is incredibly odd considering that they are being changed with the saving of the form as can be seen in the app prior to the sending of the record.

[quote=“WillowMobileSys”]

[/quote]> - there was a background process (automation or script) that changed the values AFTER you considered them updated from the Form.

I did consider this possibility (something similar anyway, as both of those are server side functions) in that maybe an action was occurring, so I set the “Form Saved” action to simply open the detail view of the edited/saved record, however this had no change at all.

[quote=“WillowMobileSys”]
I suggest running the test again. Wait a couple of minutes before Syncing and then re-confirm the datasource has the correct values. Then Sync. Do the values still change?
[/quote]>

As covered in my earlier comments of this reply, the values do not even make it to the server, let alone the datasource.

I hope this has cleared up any confusion and/or answered any/all questions you had.

In your original post, you commented… “problem appears to occur at sync”. The assumption here is that you are referring to the AppSheet Sync function which IS only a one-way synchronization from AppSheet servers to the device as I described before. I don’t consider app edits submitted TO AppSheet servers a synchronization function…but that can be debated at some other time.

I have had this issue several times - where values just seemed to not make it to the servers. And each time I found that there was something overwriting the values.

I know you are seeing that audit logs show the values are NOT sent but from my experience not EVERY activity is logged. At the very least, it is extremely difficult to reconstruct the chronological order of all the events. My point is that it may be difficult to see just from the logs that your original values were submitted but then later overwritten.

The best way to test this problem, IMHO, is to run your app using a Google sheet. Have the sheet open when running the test and watch it very closely. Every edit will be presented on the viewed sheet and you will be able to tell very easily if your original values made it to the sheet and then were overwritten or just didn’t make it there at all.

Not very elegant but it works! There just isn’t any other good way to test or even detect this issue…that I am aware of.

2 Likes

This indeed is a handy troubleshooting technique. Also, I recently learned that it’s not even necessary to directly watch the sheet. You can use Sheets’ show edit history for a cell to easily review in sequence the previous values for a cell.

1 Like