Batch Reporting for Multiple Records I have ...

workflow
(StudentHomes Plymouth) #1

Batch Reporting for Multiple Records

I have a workflow rule that produces & issues a pdf report attachment each time a record is added or updated which works fine. Problem I now face is that I want to select a series of records to report in a single batch to a continuous pdf file - is this possible?

In the ideal world I would like to view the data in table view and have a tick box (similar to multiple delete) that can be selected and upon completion of the selection of a batch of records in this manner run a workflow to send all these records to the pdf report template thereby creating a multiple page report based upon several records.

To clarify my selection criteria for records will generally be based upon a set of filtered records with the filter criteria being:-

  1. Property ID 2. Type of Inspection 3. Date of Inspection

This type of filter will generally provide a list of records based upon one for each room or area in the selected property, so typically could be about 10-20 single reports that will generally be single summary pages including photos.

Can anyone advise if this is possible and, if so, how to go about achieving this? Many thanks, Steve

(Praveen Seshadri (AppSheet)) #2

Hi @StudentHomes_Plymout, yes this is possible.

First, to understand how the report is authored, please read about “scheduled reports” in our documentation. The workflow attachment template document can have multiple nested <> expressions that let you iterate over a set of records in a table or slice and then to also get related records for each of them if you want.

Normally, this sort of report is run on a schedule — eg: send an Open Orders report every morning.

But if you want, you can use the same sort of template to send a report “on demand” as well. See “Sending Email from an Action button” in this article. help.appsheet.com - Workflow

Workflow help.appsheet.com

(StudentHomes Plymouth) #3

Hi Praveen, thank you for your prompt response.

Whilst I was relieved to note that you say it is possible, having read the article you referred to and looked at the sample app I am still struggling to find a way to set the filter in the way I want.

Put simply I want to list my pre-filtered records in table view and have a check box structure like the delete selection screen (see example screenshot). However instead of the selected action being to delete the record I want to generate a pdf report that includes data from the selected records. I am familiar with the basics for generating an email with a report attached based upon template design. Where I am falling down is just how to achieve the selection of individual records that are to be included when creating adhoc reports.

The easiest way for the end user to select the records they require is for me to provide a simple filtered table view and them to “tick” the records they want to include - please can you give some guidance as to how to achieve this? Thanks …

(Tony Fader) #4

@StudentHomes_Plymout Here’s a similar example app. You don’t select the individual records you want to include in the report. Instead, you construct a filter on the records that you want to include (e.g. color or size). appsheet.com - Custom reports - Reports that users can customize

Custom reports - Reports that users can customize appsheet.com

(StudentHomes Plymouth) #5

Thank you Tony, I’ll take a look

(StudentHomes Plymouth) #6

It appears I’ve fallen at the first hurdle! I copied the formula for the virtual column from your app and then edited to accord with my table & column names, thus:-

SELECT(Inspections[Property], AND(IN([Reason for inspection], [_THISROW].[Type of Inspection]), IN([Date of inspection], [_THISROW].[Inspection Date])))

However, I keep getting the verification message “Parameter 2 of function IN is of the wrong type”

I’ve double checked my data types and they appear to align with yours i.e. Enumlists with data being stored as text (except for date). Any idea what I may be doing wrong?

(Tony Fader) #7

@StudentHomes_Plymout You’ll need to make your [Type of Inspection] and [Inspection Date] columns EnumLists. Can you doublecheck that?

(StudentHomes Plymouth) #8

Hmm, yes that then accepts the formula but pretty much renders the input form useless as I can no longer entre an inspection date?

(Tony Fader) #9

@StudentHomes_Plymout You probably want something like this instead of the IN:

[Date of Inspection] = [_THISROW].[Inspection Date]

The IN(X, Y) checks whether X is in the list Y. But in your case, X and Y are both dates, so you can use an equality check.