Use case 

You need to insert statuses depending on some condition.

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 *, CASE WHEN 'Employees' < 60 THEN FORMATWIKI("{status:colour=Green|title=Low}") WHEN 'Employees' >= 60 AND 'Employees' < 150 THEN FORMATWIKI("{status:colour=Yellow|title=Medium}") ELSE FORMATWIKI("{status:colour=Red|title=High}") END AS 'Status' FROM T1
    SQL
  6. Click Next

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

  8. Save the macro and the page.

You can also use an alternative way of inserting statuses in a table.