Action to Call Workflow to Create PDF

I want to be able to produce a PDF report on demand from an action button in a particular record.

Although I haven’t been able to get the save as PDF workflow to work (are there bugs in the save file feature?), I don’t see a way of initiating a workflow from an action button.

if I’ve missed it, sorry, but I would think that this would be a very useful feature.

This is kind of possible if you write something to your record. Please check a sample app called https://www.appsheet.com/samples/An-app-that-sends-email-when-you-click-a-Action-button-on-the-client?appGuidString=7fd5e590-8388-4b20-8087-ba0a7be51607

1 Like

Thank for the pointer.

In the end and I did it in the following way that might be useful to other users.

  1. Have a column named Print in the relevant data table as a Yes/No

ACTIONS

  1. Create an action to set the Print column to TRUE, given an appropriate display name and display it prominently on the record detail.

  2. Create an action to set the Print column to FALSE and do not display it.

WORKFLOW

  1. Create a workflow that either saves or emails a PDF report to the logged in user.

This will be kicked off when there’s an update to the record AND the Print column is TRUE.

Then follow this by a second workflow action that calls the set print column to FALSE action

1 Like

Another solution is to write the value with the NOW(). Then you don’t need to reset the value with an action because it’s always different.

2 Likes

Aleksi

I thought about that first, but I couldn’t work out what condition I would use to trigger the workflow?

[Printed] = NOW() ?

I was thinking that now would be different by the time it got into the workflow.

@PocketSurvey

AND(
    ISNOTBLANK([Printed]),
    NOT([_THISROW_BEFORE].[Printed] = [_THISROW_AFTER].[Printed])
)
1 Like

I just did a similar thing yesterday. My workflow was running on the save button of a view that allows the user to select their filter parameters, but that was not what I wanted. I added a column EMAIL_REPORT? Initial value set to FALSE. When User clicks TRUE the workflow will run when the user clicks Save. Now I need to add a step to reset the EMAIL_REPORT? value to FALSE after the report is run.

@Lucinda_Mason
I may advise changing the column type to Datetime, leave the initial value blank and set an action button which records NOW() value to this column. You can use the conditional expression I have proposed above to trigger the workflow on UPDATES_ONLY

2 Likes

Thanks.

You’re very welcome

2 Likes