Skip to main content
Skip table of contents

Print Functions

Print Functions are used in text blocks to render content of an item or other dynamic content. All of the print functions can be found in the Print Functions menu of the rich text editor.

Render summary of a table

From 2.3.12692.20229

Can be used to summarise tabular data. To use this you need to create a table with the data that you want to summarise. Simple cases such as row counts will work with any data type but more complex cases such as sums will need all data in the column to be numeric.

  • Create a TABLE with the data that you want, potentially using subtables to pull in data from referenced items etc. Note that the table will be run with the item that the print function is used with. So for example if you want to count all test cases linked to a specification you create a TABLE that takes a specification as input and iterates over the links to test cases.

  • Create a BLOCK for the summary that you want to display.

  • In the text area of the BLOCK add a “Render summary of a table” function

  • Open the options of the function and set the following values:

    • Table ID of the source table you created above, for example TABLE-23

    • The summary you want to perform

    • The column number of the column you want to work on (starts with 1)

    • The rounding to be performed on the result

  • Include the BLOCK in some other output which iterates over items. It will then render the table for each item and calculate the summaries for the result and render them.

Count rows of a table (field)

From 2.3.3

Counts rows of a table field, for example the test steps, based on matching a regex. For example if you want to know how many test steps are either failed or need documentation you can configure it with the following setup:

JSON
{
  "renderFunction":"count_table_rows",
  "fieldName":"Test Case Steps",
  "showRowsMatching":{
    "result":"p"
  }
}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.