Date lag on PDF reports

We are in need of some advice in lieu of any input from AppSheet's engineers on a ticket raised via the 'Support' link.

For the last several weeks, we have noticed that PDF reports state inaccurate dates, typically 24 hours behind the actual date submitted or when the app was last used. This is occurring across all apps, of which we have several running at any one time and none of them have been modified in any way whatsoever for a long time.

Typically, the apps will have a default condition of [DATE] = TODAY() to fire the report and for speed, cells in the input spreadsheet will reference one other, written as '=$(cell)$(number)'. These bots have updates, adds and deletes enabled.

The two snips below illustrate the email received indicating the correct date and that of the report issued which shows the date wrongly, in this instance the date when the app was last used.

Screenshot 2024-03-26 072725.pngScreenshot 2024-03-26 072926.png

Has anyone any ideas on how to resolve this as painlessly as possible? As mentioned, there has been no worthwhile input from raising a ticket and online chat degenerates into the nuclear option of creating a custom template via AppSheet which, to be fair, works to a degree but would ultimately require redesigning a whole tranche of output templates which seems excessive and unfair as the issue does not emanate from our side.

1 22 241
22 REPLIES 22

Is your Bot triggered with data change or schedule? Would you please take a printscreen from your template with your formulas, thanks. Also.. please take a printscreen from those same rows in your spreadsheet where the same rows are shown.

Hi Aleksi. The bots are triggered by data change. We have resolved one by turning it into an email report as an attachment isn't strictly necessary; however, the others need to be PDF reports as they contain a number of fields:

Word templateWord templateExcel templateExcel template

The ID field is controlled via a referenced cell whose formula is =DEC2HEX(RANDBETWEEN(0, 4294967295), 8). This has been in existence on the app for some time and has not created any issues, but just to avoid another question and waiting for a response.

The problem is also present in the same way on an entirely separate suite of apps, again triggered by data change and with the condition of [DATE] = TODAY(). These have been in use for well over a year without update.

Let's try to focus with one issue only. Otherwise it would impossible to follow. It's clear to you, but not for other community members ๐Ÿ™‚ So.. if we are discussing about the [Date]=TODAY(), your Excel file doesn't seem to be related as the date is shown as 00/01/1900. Would you please give us a good sample from your Excel, details when the Bot was triggered, and what happened exactly last time, thanks.

Hi Aleksi. Yes, it is a rather large problem! Google's engineers have made contact but only at a basic level of enquiry.

The [DATE] = TODAY() is correct, I showed a sample of a template, apologies. Below is a real-life screengrab:

From Excel.From Excel.

Here is the desktop display of the app as it can be viewed on a mobile device at this very moment:

App view.App view.

Here's the email notification:

Email preamble.Email preamble.

This is the PDF report, you will see that the date is wrong:

PDF report with incorrect date.PDF report with incorrect date.

And here we have the basic setup of the bot:

App settings.App settings.

Please note that the above illustrates the problem with three similar apps. We have another suite for different activities but using the same build-up/architecture/theory so in all we have about a dozen apps which are failing daily.

That sounds weird. Any chance you have duplicate key values in your table? Is the [Check] column the key column? What happens if you add the Start: & End directly to your email body without any template? Does it then work properly?

It is, isn't it? Just singular key columns, as shown below:

HGV app setup.HGV app setup.Job app setup.Job app setup.

As noted before, no changes to these arrangements for months, certainly a long time before the issue started presenting itself.

I haven't tried the Start/End idea (assuming that it would be written as follows, if not please correct me) as there's so much data to capture and I'm not sure about legibility. I can try though:

Check: <<[Check]>>

ID: <<[ID]>>

Description: <<[Description]>>

Response: <<[Response]>>

State: <<[State]>>

Notes: <<[Notes]>>

Signed: <<[Signed]>>

Date: <<[Date]>>

Test it with..
<<Start:TOP(SELECT(Checks[Check],[Date]=TODAY()),10)>>
<<[Date]>><<End>>

Tried that and I get the following errors in a fresh app, purged of all other bots etc:

Test app errors.Test app errors.

Which is plainly stupid, because the table is told to point to this sheet and the Excel file has the correct name, plus the logic has been copied into the email body as advised:

Table setup.Table setup.Template & sheet name.Template & sheet name.

Email body text.Email body text.

You need to use the table name with the formula instead of the sheet name in Excel.

Now corrected, this is the resulting report:

At least the date is correct.At least the date is correct.

What is your Start: & End formula on your Word template?

<<Start: SELECT(Checks[Check],ISNOTBLANK([Description]))>><<[Check]>>

<<[Date]>> <<End>>

 

If I have understood your table structure properly, instead of using Checks[Check] with the table & column name, you need to use Daily Plan Inspections[Check] on your template.

Updated to <<Start: SELECT(Daily plant inspection[Check],ISNOTBLANK([Description]))>><<[Check]>> and that appears to work, so success there.

The other apps, written as <<Start: SELECT(Checks[Check],ISNOTBLANK([Description]))>><<[Check]>>  and are otherwise set up as below; the table Checks is also cited in all elements of the bot, same as the other:

Table setup.Table setup.

So.. you have now modified the table name in email Subject and template. Are they both working fine now?

Hi Aleksi. Looks like I spoke too soon: I just ran the report, updated it to today's date to fire the bot and the report came in with yesterday's date in all cells. I have checked the input spreadsheet and it has today's date on it.

Do you have server caching or Delta sync ON? If yes, change them to OFF, and test it again.

No,  all options in the Performance/Sync section are off/grey.

Without seeing your data source and the app itself, it's difficult to understand where the reason is. I'm running out of ideas, unfortunately.

Happy to share if at all possible.

Hi @AleksiAlkio, is it possible to share the app and/or the templates with you for analysis?

The issue is ongoing. AppSheet support via Google is lamentable - we've had someone remote in and run a couple of reports and ask already-answered questions and no update.

@AleksiAlkio is there anything you can add or think of regarding this issue (still happy to share the app with you), and can you or anyone else here advise how we go about requesting compensation (not that I really expect much joy in so demanding, given the vastness of Google).

Top Labels in this Space