I have a table in confluence. I can use the table transformer plugin. (https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Table+Transformer+macro) where is it possible to add sql queries with a reduced set of commands. With SELECT ARRAY(T1.'email' + " ") FROM T1 WHERE T1.'ART_Role*' LIKE "SM" AND NOT NULL
I was able to get all mail addresses from the table. But still got the problem:
Can anyone help me how change the separator and remove the duplicates.
Or do you have a better idea to
Hi @Robert Mang ,
I can suggest the following workaround: wrap your table subsequently into the Table Transformer and then into the Pivot Table macro.
Go to the Table Transformer settings:
SELECT DISTINCT T1.'email' as 'Email List', T1.'ART_Role*' FROM T1
WHERE T1.'ART_Role*' LIKE "SM"
Here we use the DISTINCT command and select only the unique emails.
Then go to the Pivot Table macro settings:
Go to the Options tab and set the required separator:
Now when you publish the page and export the result table in the CSV format, you'll get a list separated by the ";":
If you don't need the first column, you may use another Table Transformer or Table Filter macro on top of the Pivot Table macro, hide this column and then export your emails.
@Robert Mang , I've consulted with our developers and they have a more beautiful solution:
SELECT SUM(DISTINCT T1.'email' + ";")->slice(0, -1) as 'Email List' FROM T1
WHERE T1.'ART_Role*' LIKE "SM"
Hope this helps your case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.