Something wrong with client-side versus server-side validation? (Time value with 3 seconds digits.)

On one app in one account, if I enter a something like "12:34:567" into a Time type column, it causes an error during sync.

Marc_Dillon_0-1682454125725.png

 

In another app on a separate account, it does not cause an error during sync, appears to fully sync, but the new value is completely discarded, and the old value comes back. Then looking at the backend GSheet, the value did not ever change. But the audit log record of the change exists. Also, if I change any other columns at the same time, those changes never make it as well, and are reverted.

Seems obvious that the different accounts have different rollouts on them, where the validation is working differently, right?

------

We've seen many threads over the years about in-app changes not updating the backend. Typically it's due to bots or actions or resetOnEdit that the user setup but forgot about, but sometimes it seems to be unsolvable. I'm wondering if I've found an explanation for some of these things here. It seems like there are 2 validation systems, one on the app client-side that immediately informs the user of invalid data, and another on the server-side where it stores the new data into the source. If it passes the first validation, but not the second, it either throws an error, or just.... completely discards the change??

Typically that second validation is important for sources such as SQL where it has its own data types per column (or maybe even a 3rd validation step for that, who knows...). Not so much for GSheets where you can just format everything as plain text. Both the above tests were on plain-text formatted GSheets to avoid any conflicting issues there.

Does this make any sense?

Can anyone can test this 3 seconds digits in a Time value thing on their end and report back on what it does?

0 3 452
3 REPLIES 3


@Marc_Dillon wrote:

enter a something like "12:34:567" into a Time type column


Do you mean as a user via a form view? In my quick test, the UI doesn't even let me enter more than 2 digits. For example, if I select the "00" seconds value and then type "1", "2", and "3", the value changes first to "01", then to "12", and then to "23".

dbaum_0-1682467483325.png

 

dbaum_1-1682467500586.png

 

dbaum_2-1682467515084.png

dbaum_3-1682467533767.png

 

dbaum_4-1682467549982.png

 

Or, do you mean something like using "12:34:567" as an initial value expression?

As manual input in a form.

All my tests were in Firefox. I often forget that Firefox's input fields in Appsheet are sometimes different from other browsers, or the mobile app itself. Yes, I see now that Chrome, as well as the mobile app, prevents a 3-digit input. Firefox allows full manual input, or rather, requires it.

Hmmm. Doesn't really answer the question though. Sure, it's good that the input modal only allows valid input in those cases, but that's different from actually detecting and invalidating any bad input before allowing the record to save.

I guess I should also say that the impetus for my investigations here was because I had a user run into a sync error due to a 3-digit second input. I can't say for certain, but they should have been using the mobile app. I suppose I still have no idea how, why, or even if they manually entered those 3 digits. But I think something is off here, regardless.

 


@Marc_Dillon wrote:

Chrome


Yep, I was using Chrome when I replied earlier.

I just tested on Firefox (macOS), and was able to type in "12:34:567" and save a new row in a form. The tally in the sync icon lingered, and I reopened the row in the form view and the value persisted.

dbaum_0-1682486090732.png

I manually selected the sync button, and it spun a while before producing the same error from your OP.

dbaum_1-1682486412824.png

I also just tested within the iOS AppSheet mobile app. Here, I was also able to type in "12:34:567", but immediately received a "This entry is invalid" validation error.

FYI: This was all using a table whose source is an AppSheet database.


@Marc_Dillon wrote:

looking at the backend GSheet, the value did not ever change. But the audit log record of the change exists


I also happened to observe this tonight after my first reply. My scenario is unrelated to validations or Time columns, but I point it out in case there's something additional going on altogether and what you're observing is actually multiple unrelated issues. In my case, a GAS script called the AppSheet API multiple times to perform different actions. One of those calls worked just fine (added 4K rows). The other seemingly successfully (per the audit log) called an action that just toggles one value in one row from false to true, but in the GSheet cell the value didn't update, and the cell's edit history showed that its value hadn't changed in several days.

Top Labels in this Space