Advanced document generation

Beyond using a button to generate a document from a page in Nintex Apps, there is more customization you can do to further enhance the document generation experience.

For example, you can use block messages to provide more detailed information to the document generator, and even provide more detailed error messages should an issue arise during document generation. Most of these advanced features come down to your understanding of how to build an app in the page designer, but there are some more advanced features that apply to document generation.

In this section we will walk through a few examples of some of the more advanced document generation features.

Scenario - Use the Download action to create a "document history table"

This scenario walks through creating a document "download center" to display a list of documents that have been previously generated. In this example we are going to be using the DocGen Instance (List) object model to display a table with a list of documents that have been generated that can then be downloaded using the Download action.

This scenario assumes the following:

1. Add data models and table to the page

  1. Use an existing page or create a new page using the apps page designer.

  2. Open the Models tab.

  3. Click the + icon to add a new model.

  4. Name the model "DocumentTable".

    Note: You can name the model whatever you want for your own reference. In this example we are going to call the model "DocumentTable".

  5. In the Connections field, select Documents.

  6. Under Object, select DocGen Instance (List). Click OK to close the window.

    This adds the following data object fields:

    1. Id

    2. endDate

    3. startDate

    4. packageName

    5. status

  7. Return to the page designer and select the Components tab.

  8. Add a table to the page using the Table component.

  9. In the table Settings window, in the Model field, select the model created. In this case, select DocumentTable.

  10. Click Add fields.

  11. In the Model fields window, click + next to each field referenced in Step 6. This adds each of the data model fields to the table.

    Note: Select Display all object fields if the fields are not displayed.

  12. Click OK. The table is added to the page.

  13. Click Add feature above the table and select Row action. This adds the Run action button to the table.

  14. Select the Run action button and change the label to "Download".

  15. Click Save.

2. Add Download Document action

  1. Click the Action flows tab.

  2. In the Action flows menu, click the + icon.

  3. In the Name field, type "Download Document".

  4. Click Create.

  5. In the Action flow screen, click the + icon.

  6. Select the Documents connection and then select the Download Document action. This adds the Download Document action to the flow.

  7. In the Instance field, reference the Model field that identifies the document to download. In this instance, use the id field. Type in the following: "{{id}}".

  8. Click Save to save your progress.

3. Create the Download run action

  1. Return to the page designer, and select the Download button to display the Settings pane.

  2. Click Interactions > Add > Add action flow.

    This creates the Run action bound to the table component and opens the Action flows menu. You can see the new action under the Component Bound section.

  3. In the Run action flow, click +.

  4. Select Core actions and search for "Run action flow".

  5. Select the Run action flow option under the Logic section.

  6. In the Run action Settings menu, click the Action flow drop-down and select Download Document. This is referencing the Download action flow created in Step 2.

  7. Click Save to save the page.