Use case

You have a table or macro outputting non-string data that you want to format as string data

You need to create a separate column displaying the dedicated due quarters based on its source due dates.

Solution

  1. Switch the page to the edit mode.
  2. Insert the Table Transformer macro and paste the table within the macro body.
  3. Select the macro and click Edit.
  4. Switch to the SQL query tab.
  5. Enter the following SQL query:

    SELECT *,
      CASE WHEN TEXT(T1.'Due Date') LIKE "%Jun%"
      THEN FORMATWIKI("*","Q2","*")
      WHEN TEXT(T1.'Due Date') LIKE "%Sep%"
      THEN FORMATWIKI("*","Q3","*")
      WHEN TEXT(T1.'Due Date') LIKE "%Nov%"
      THEN FORMATWIKI("*","Q4","*")
      END as 'Due Quarter'
    FROM T1
    SQL
  6. Click Next.
  7. Define the table settings and view options
  8. Save the macro and the page.

The TEXT function formats non-string data (e.g., dates, numbers) as string data, enabling the use and combination of other string functions, such as LIKE, etc. in the Table Transformer macro.

You can use FORMATWIKI function for the purposes of cell formatting.