Use case 

You need to add conditional formatting of table data.

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 T1.'Month', FORMATWIKI("{cell:bgColor=" , CASE WHEN T1.'Bread' <= "100" THEN "#FA7E70" WHEN T1.'Bread' > "100" AND T1.'Bread' <= "200" THEN "#FFE784" ELSE "#8FCA7D" END , "}" , "$" , T1.'Bread' , "{cell}") AS 'Bread', FORMATWIKI("{cell:bgColor=" , CASE WHEN T1.'Rolls' <= "100" THEN "#FA7E70" WHEN T1.'Rolls' > "100" AND T1.'Rolls' <= "200" THEN "#FFE784" ELSE "#8FCA7D" END , "}" , "$" , T1.'Rolls' , "{cell}") AS 'Rolls', FORMATWIKI("{cell:bgColor=" , CASE WHEN T1.'Cookies' <= "100" THEN "#FA7E70" WHEN T1.'Cookies' > "100" AND T1.'Cookies' <= "200" THEN "#FFE784" ELSE "#8FCA7D" END , "}" , "$" , T1.'Cookies' , "{cell}") AS 'Cookies', FORMATWIKI("{cell:bgColor=" , CASE WHEN T1.'Muffins' <= "100" THEN "#FA7E70" WHEN T1.'Muffins' > "100" AND T1.'Muffins' <= "200" THEN "#FFE784" ELSE "#8FCA7D" END , "}" , "$" , T1.'Muffins' , "{cell}") AS 'Muffins' FROM T*
    SQL
  6. Click Next

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

  8. Save the macro and the page.