What is document selection logic
Anvil Workflows allow you to generate customized PDF packets based on a set of logical conditions. A single Workflow can accommodate a variety of outcomes and different final PDF output needs. By adding all PDFs that could possibly be included in a Workflows’ output packet and setting visibility rules for each PDF, Anvil will dynamically select and fill the correct PDFs for you.
For example, a landlord may have standard lease agreements for each state and an additional lead-based paint disclosure for properties built before 1978. In this case, standard lease agreements for each state and the disclosure document would be added to the Workflow. With document visibility logic added, Anvil would select the lease agreement for the state indicated in the Webform and include the disclosure document for any buildings built before 1978.
Add selection logic to documents
Logical conditions are commonly based on Webform fields. Before you start adding selection logic to documents, be sure to add all relevant Webform fields and documents to your Workflow first.
To add document selection logic to PDFs:
- Navigate to the Workflow editor
- Select the PDF tab in the top toolbar
- Click the PDF navigator and select the relevant document
- Select the Logic tab in the PDF editor panel
- Click Add condition
- Select the Webform field you want to base your document visibility on
- Add relevant condition
- Save
Repeat these steps to add more conditions to the current document or any additional documents.
Note: To add more complex logic, use the advanced JSON editor instead.