Table Filter, Charts & Spreadsheets for Confluence Table Transformer Custom Transformation - use cases with advanced SQL queries Working with variables in SQL Current: @currentUser variable PDF Download PDF Download page @currentUser variable. Current page All pages @currentUser variable Use caseYou have a table with user names. You need to get a dynamic result table where rows correspond to the logged in (current) user.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.'User' = @CURRENTUSER SQL Save the macro and the page. The @currentUser 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 @pageTitle variable, please visit the corresponding page. ×