Table Filter, Charts & Spreadsheets for Confluence Table Transformer Custom Transformation - use cases with advanced SQL queries Working with variables in SQL Current: @pageTitle variable PDF Download PDF Download page @pageTitle variable. Current page All pages @pageTitle variable Use caseYou have a table with page titles. You need to get a dynamic result table where rows correspond to the current page title.SolutionSwitch the page to the edit mode.Insert the Table Transformer macro and paste the table or the macros outputting tables within the macro body.Select the macro and click Edit.In the Presets tab select Custom transformation and click Next.Enter the following SQL query: SELECT * FROM T1 WHERE T1.'Page Title' = @PAGETITLE SQL Save the macro and the page. The @pageTitle variable can be combined with other variables within the same query and successfully used in more complex SQL queries. Use case with several variablesYou have a table with the list of people (user names) responsible for publishing documentation pages.You need to do the following:Find the logged in (current) Confluence user in the 'Responsible' column and color it in blue (the others will be green)Add the current page title (i.e. where the current Confluence user is now) to all the existing page names in the 'Page' table columnSolutionSwitch the page to the edit mode.Insert the Table Transformer macro and paste the table or the macros outputting tables within the macro body.Select the macro and click Edit.In the Presets tab select Custom transformation and click Next.Enter the following SQL query: SELECT FORMATWIKI("{color:" + IF(T1.'Responsible'= @CURRENTUSER, "green", "blue") +"}" + T1.'Responsible' + "{color}") AS 'Responsible', "@pageTitle - " + T1.'Page' AS '@pageTitle' FROM T1 SQL Save the macro and the page. To learn more about the @currentUser variable, please visit the corresponding page. ×