You might have a use-case in which your end user needs to select data or ranges and you want to use that information to select data for PDF Butler to handle. We got you covered and you do not even have to write APEX!
EXAMPLES: #
Use case: pass on list of recordIds as a parameter to use a DataSource Variable. In our example we will select all Opportunities and let the User choose which one to select via a DataTable in a Screen.
The image below show the overview of the flow.
- Get all Opportunities
- Screen to show a DataTable with all Opportunities so the User can selects which ones to display
- Transform the selected Opportunities into a collection of Ids
- Set the “parameter” and “ids” Apex-Defined variables
- Call PDF Butler Flow Action and set the Parameters

1) Get all Opportunities: This is default Flow functionality, we do not think we should explain that here 😉
2) Screen to show a DataTable with all Opportunities so the User can selects which ones to display
The source are the records selected by step 1

3) Transform the selected Opportunities into a collection of Ids
Select the “Id” field of the selectedRows and transform that into a collection of Text

4) Set the “parameter” and “ids” Apex-Defined variables
Use the “valueStringList” property to assign the collection of Ids.
Set the “key” to the variable name that you will use in your DataSource

This is the DataSource with the variable:

5) Call PDF Butler Flow Action and set the Parameters

