Dynamic table component

  1. Overview of the dynamic table
  2. Adding custom data to the dynamic table
  3. Editing the dynamic table

Overview of the dynamic table

The dynamic table component can be used to display lists/arrays of custom data (EG line items in an invoice, a list of qualifications in a CV, sales stats). The dynamic table will always appear as two rows when you add it to the editor canvas:

  • A header row (with the column headers)
  • A data row (for custom data)

But the actual number of rows that appear in your PDF will vary depending on the custom data you send (see next section).


Adding custom data to a dynamic table

While the dynamic table will always appear as only two rows in the editor canvas, the actual row number will vary in your PDF depending on what custom data you add. You can set the type of data that will appear in the table using the 'Data Type' field in the 'Properties' tab:

The data type you set should match the key/property name of the array of data you're going to populate the dynamic table with. For example, if your data source is set to 'items', you'll need to make sure you include an array with the key 'items' in the JSON you send when making a call to the DocuPotion API:

By default, the data source is set to 'items' on dynamic tables. You'll see in the 'Data' tab that the key of the array of sample data matches this:

If you update the data source in the editor this will be reflected in the Data tab:


Editing the dynamic table

Width

In order to change the width of a dynamic table, select the component as a whole (by clicking one time anywhere on the table) and adjust the width using the resizing handlers or by using the 'Width' field in the Properties tab.

Height

In order to change the height of the dynamic table, select either the header row or data row by clicking on the row selection handles (at the left-hand side of the table) and use the resizing handlers to adjust the height:

Cell content

You can edit the content of a specific table cell by double-clicking on a specific cell:


Adding columns

To add a new column to a table, select the table as a whole (by clicking once anywhere on it) and hover over the border between cells. You'll see a green '+' button appear. Click on this button to add a new column:


Deleting columns

To delete a specific column in the table, select a header cell by double-clicking on any cell in the header row. When you do this, a red 'X' button appears above that column. Clicking on the 'X' button deletes the column:


Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.