Simplest way to create on-demand report

Hi Guys,

What is the simpliest way to create and download on local desktop a PDF report at row-level. An order for example.

Right now I use a workflow with a Send email or Save file action, looking for adds in a “Request report” table. Request refencing the Order table.

Is there any simplier way ? Dowloading possible ?

Thanks

Solved Solved
1 21 1,189
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

Not directly, no. You have to generate the report with a workflow. You can then provide the user with a link to open the report, but there is no way to generate-and-download.

View solution in original post

21 REPLIES 21

Steve
Platinum 4
Platinum 4

Not directly, no. You have to generate the report with a workflow. You can then provide the user with a link to open the report, but there is no way to generate-and-download.

Thanks Steve,

Fair enough. Is there a way to automatically integrate the saved file url within a row ?

I’ve not done it myself, but I suspect it’s just a matter of giving the generated report file a predictable name, then adding a File column to your table that contains that name.

Note that AppSheet caches files, so if the file name is fixed but the content changes, the user will only be able to download the earliest version and won’t see the updates. To allow the user to get updates, the file should be given a different name with each update. By default, AppSheet adds a timestamp to each generated file’s name to accomplish this, but this then means the app won’t know what exact name the file is given. To get around that, disable the automatic timestamp and generate a unique filename yourself so you know exactly what name the file will be given.

Hi Steve,

I think I got the idea.

I did a workflow like :

3X_8_d_8d47c2081d1d54992abaafd8609199c61c7387e9.png

Also a virtual file type column :

3X_7_5_758450a14b17a15495a9437dc294191dfabc80cf.png

The file type column seems to ignore the folder path part of the concatenation. I get only th ID part + .pdf. Of course the link does not work.

3X_b_0_b0a64c611a9278bd6b47da4f8b1aca86753cee7e.png

Does it look like a bug to you or did I miss something ?

Thanks

Try removing the folder path entirely in both places until you get the basic function to work.

Tried it !

When I remove the folder path from the workflow, the file goes to the “Files” folder (in the app data folder).

Then if I remove the folder path from the concatenate function, it fails (while it looks to the root I guess).

if I write CONCATENATE(“Files/”,[commande_achat].[ID],".pdf"), it fails too (still ignoring the folder path part.

Hmmm… Time to summon some help!

@Aleksi, HEEEELP!!!

In generally…
#1 - Set the folder name in your Workflow rule like “/SubFolderName”. This will create a subfolder under the Appsheet/Data/AppName-123456 folder
#2 - The PDF file prefix could be <<[ID]>>
#3 - Then create a virtual File column with an app formula CONCATENATE(“SubFolderName/”,[ID],".pdf"). This will create a file name to your PDF. In the app it shows it just like “k8HtG6vS.pdf” if that is your ID column’s value.

Hi Aleksi,

I tried exactly what you described. The subfloder “/SubFolderName” is created in the default app folder, not where the spreadsheet is. The report is properly generated. Stil the link made by concatenate function fails.


3X_9_3_930e4ecd6f022a1801a18a1fefb16a21f15c545d.png
3X_1_5_1567ce47f9849be33240747b54aa8f438e225c84.png
3X_c_5_c5fdfbad66241ac2b1cae9d699ba08712e060aa8.png

Sorry… wrongly noted as my spreadsheet was already in the app folder. I updated the original reply.

The attachment file name needs to be <<[ID]>>, not just [ID]. That will create a file with a name “[ID].pdf”

Like this ?
3X_3_3_33b69eed64cb405887cf6103845deb2841cd849e.png
The workflow make app error.

Actually with [ID] alone, the file name looks OK already.
3X_2_6_26779251401f2a0cbb1e274cf51bcb49c040ec42.png

I believe it’s not. It’s just updating the already exists [ID].pdf file because you don’t have any timestamp.

I confirm that <<[ID]>> in file prefix in the workflow make app error.

Actually I would prefer let the time stamp but it seems no way to concatenate the system generated timestamp to build the predictive file name.

However, the all point here is that I fail to generate a functional file link with the concatenate expression. The result in the spreadsheet looks OK too.
3X_2_f_2f192b7e2d4d4f9322d0f821281829f9c8fa9514.png

Do you have that [ID] column in your table where you generate that Workflow?

Sure :

Just realized from one of your printscreens that you are actually using “Save file” action rather than “Email”. With the Prefix you need to use “[ID]” instead of “<<[ID]>>” which is little weird that we have different rule for two different actions. I will discuss about that with devs.

What is your default app folder? You can find it from Info > Properties

I have been trying with quotation mark. I got the file name, which is not usefull

3X_4_0_40b7a1995ba5e172bd10e38c3f1830be3f2ae72c.png

Here is my default app folder :
3X_f_5_f5ab4a712f888f39063cd3ea9191e0b58d5373cb.png

Would you please send an email to support@appsheet.com so we would be able to check your app directly. Please also mention my name so I will check this.

We discussed about this internally and it’s actually not meant to work like the original way even the sample app was working with that way. We are surprised that it ever worked as it should not. The correct way to do it is with the URL as…

CONCATENATE(“https://www.appsheet.com/template/getappfileurl?appName=AppName-1234567&fileName=SubFolderName/",[ID...”)

When you use a File column and app formula with this URL, it shows it like aSd765Tg.pdf in the app.

Top Labels in this Space