Use case

You need to fill in the missing values in the specific columns based upon their first corresponding values.

Solution

  1. Switch the page to the edit mode.

  2. Insert the Table Transformer macro and paste the table or the macros outputting tables within the macro body.

  3. Select the macro and click Edit.

  4. In the Presets tab select Custom transformation and click Next.

  5. Enter the following SQL query:

    SELECT *,
    COALESCE('Date', (SELECT LAST('Date') FROM T1 WHERE T1.'__' < TT1.'__' AND 'Date' IS NOT NULL)) AS 'Date', 
    COALESCE('RuleName', (SELECT LAST('RuleName') FROM T1 WHERE T1.'__' < TT1.'__' AND 'RuleName' IS NOT NULL)) AS 'RuleName',
    COALESCE('Eng.', (SELECT LAST('Eng.') FROM T1 WHERE T1.'__' < TT1.'__' AND 'Eng.' IS NOT NULL)) AS 'Eng.'
    FROM T1 AS TT1
    SQL
  6. Click Next

  7. Define the table settings and view options if needed. 

  8. Save the macro and the page.

The transformation process relies heavily on the presence of a numbering column in your source table. If your original table does not include this, you can easily add one using either of the following methods:

  1. Confluence’s native table tools – Add a numbered column manually or using built-in options.

  2. Table Filter and Charts for Confluence – Wrap your table with Table Filter first and use its Row Numbering feature to insert a dynamic numbering column automatically.

Ensuring this column is in place is essential for accurate transformation and alignment of table data.


T1.'___'  stands for the nameless column in the SQL transformation query referring to the numbering column in that particular example.