Is it possible to resolve other macros with in Table Transformer with FORMATWIKI function?

Kamil Graczyk March 16, 2023

Hey,

what am I trying to do is to create a table transformer sql statement, that will choice the person based on sql statement result.

SELECT CASE T1.'value'
WHEN 1 THEN FORMATWIKI("{profile:user=johndoe}")
ELSE FORMATWIKI("{profile:user=janedoe}") END AS 'Profile' FROM T1;

 Unfortunately it returns me the plain text instead of macro with the profile of the user. 

Is it even possible to do such thing? 

2 answers

1 accepted

0 votes
Answer accepted
Riley Venable
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 16, 2023

Yes, it is possible to display a user's profile using the Profile Picture macro or the User Profile macro in Confluence. However, it seems that the SQL statement provided is not correctly formatting the wiki markup for the macro.

3 votes
Stiltsoft support
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 17, 2023

Hi @Kamil Graczyk ,

You may use the Table Transformer macro to transform (reorganize) tables and perform different calculations based on the source tables (manually created or generated by the Jira Issues, Page Properties Report, Content Report Table dynamic tabular macros).

Not sure what macro with what user profile you are trying to get here, but the Table Transformer macro treats its source table as a mini SQL database. So, the result of the transformation is, as usual, another modified table.

And here you may check several examples how the FORMATWIKI function works if required. Note that this function doesn't support formatting of complex macros that dynamically change the content, get data from someplace (for example, User List macro, Expand macro).

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events