Testing Reports

Hello AppSheet,

How do I test whether this will work and see what it will return on the first day of the month?

Thanks :slight_smile:

In my case, I have a ‘Run’ button:
image

Do you not see this?

I do not.

Has your application been deployed or is it still prototype?

I believe you can’t run reports or workflows from prototype applications.

I think you need to SAVE the app for you to see the run test button.

This must be the problem.

What is a document template for reports?

Thank you.

The document template in appsheet is typically a Google Doc file that contains the formatting and code that defines how the report or workflow appear.

You can read more here:

Thank you. I fixed the template issue and the run button showed up so I clicked it multiple times. Then I looked in my Google Docs folder and I didn’t see any reports. Where are the reports saved?

There should be a parameter you can specify under the workflow/report rule to specify where the documents are saved:

If no files are appearing, then there may still be an error in your workflow template. You can click on the ‘Log’ button to see if errors are being reported.

How do I specify my Google Drive?

If you are logging into AppSheet with Google, and using Google Sheets as a backend, then your application will already be using Google Drive as its filestore.

The default path to your saved workflow files will be something like:
appsheet/data/YourAppName/...

If you leave the file folder path blank, then I believe the files will default into a folder as follows:
appsheet/data/YourAppName/YourTableName

Have you checked the log to see if the report rule ran correctly?

It seems it ran correctly but I don’t see an AppSheet folder in my Google Drive.

I found the folder in my Google Drive and configured the File Folder Path to save documents in there but when I click run I still don’t see anything

For testing purposes I would suggest changing the workflow from a save file action to an email action, and have it email the file to you.

This way you can establish that the file is being generated correctly without worrying about the Google drive folder structure

Now I’m getting this error message

Audit Log Details
Properties:
{
“AppTemplateVersion”: “1.000083”,
“RuleName”: “Monthly for ‘AGID and ELISA’”,
“EventType”: “Scheduled”,
“InvokedBy”: “EditorRunButton”,
“ServerName”: “produ21ea00000E”,
“ServerRegion”: “EAST-US”,
“IgnoreSecurityFilters”: false,
“EventMatch”: “Workflow event successfully matched”,
“Condition”: “”,
“MatchesCondition”: “True”,
“ActionNotPerformed”: “14 errors present.”,
“ActionResults”: “Created 1 ActionResults”,
“Action Type”: “MakeDoc”,
“Action Name”: “Action 1”,
“Errors”: “Error: Report ‘Monthly for ‘AGID and ELISA’’ action ‘Action 1’ Body template. Expression ‘[Key]’ is invalid due to: Unable to find column ‘Key’. Error: Report ‘Monthly for ‘AGID and ELISA’’ action ‘Action 1’ Body template. Expression ‘[Test]’ is invalid due to: Unable to find column ‘Test’. Error: Report ‘Monthly for ‘AGID and ELISA’’ action ‘Action 1’ Body template. Expression ‘[Well Position AGID]’ is invalid due to: Unable to find column ‘Well Position AGID’. Error: Report ‘Monthly for ‘AGID and ELISA’’ action ‘Action 1’ Body template. Expression ‘[Well Position ELISA]’ is invalid due to: Unable to find column ‘Well Position ELISA’. Error: Report ‘Monthly for ‘AGID and ELISA’’ action ‘Action 1’ Body template. Expression ‘[Sample Received Date]’ is invalid due to: Unable to find column ‘Sample Received Date’. Error: Report ‘Monthly for ‘AGID and ELISA’’ action ‘Action 1’ Body template. Expression ‘[Schuylab ID]’ is invalid due to: Unable to find column ‘Schuylab ID’. Error: Report ‘Monthly for ‘AGID and ELISA’’ action ‘Action 1’ Body template. Expression ‘[ID Number]’ is invalid due to: Unable to find column ‘ID Number’. Error: Report ‘Monthly for ‘AGID and ELISA’’ action ‘Action 1’ Body template. Expression ‘[Name]’ is invalid due to: Unable to find column ‘Name’. Error: Report ‘Monthly for ‘AGID and ELISA’’ action ‘Action 1’ Body template. Expression ‘[Setup Date/Time]’ is invalid due to: Unable to find column ‘Setup Date/Time’. Error: Report ‘Monthly for ‘AGID and ELISA’’ action ‘Action 1’ Body template. Expression ‘[Finish Date/Time]’ is invalid due to: Unable to find column ‘Finish Date/Time’. Error: Report ‘Monthly for ‘AGID and ELISA’’ action ‘Action 1’ Body template. Expression ‘[Result]’ is invalid due to: Unable to find column ‘Result’. Error: Report ‘Monthly for ‘AGID and ELISA’’ action ‘Action 1’ Body template. Expression ‘[Technician]’ is invalid due to: Unable to find column ‘Technician’. Error: Report ‘Monthly for ‘AGID and ELISA’’ action ‘Action 1’ Body template. Expression ‘[Timestamp of Last Change]’ is invalid due to: Unable to find column ‘Timestamp of Last Change’. Error: The document body is empty”,
“DocName”: “Files/AppSheetDoc20200513_205754_157.csv”,
“FileName”: “/appsheet/data/EIA01-1334647/Files/AppSheetDoc20200513_205754_157.csv”,
“MimeType”: “text/csv”,
“PayloadText”: “”,
“PageOrientation”: “Portrait”,
“PageSize”: “A4”,
“PageHeight”: “0”,
“PageWidth”: “0”,
“AppTemplateName”: “43b7e94a-34a6-45b6-93ba-bae728c46121”,
“Operation”: “Workflow action”,
“Result”: “Failure”
}

There is an error with the expressions in your workflow template; unfortunately I would need more information to troubleshoot what the error could be. I would need screenshots of your workflow template, report rule, and table structure/columns to be certain.


When I’m designing workflow / report templates, generally I start with a blank template void of expressions and make sure the rule is firing properly under the criteria I want, being distributed correctly to the groups or individuals I want, and/or being saved to the correct folder locations that I want.

Only once I have verified that the above is working correctly do I start to build the template expressions. Building reports/workflows programmatically like this will help you to identify the point in which errors are occuring.