Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create MailTo Button from table of Mailadresses in confluence

Robert Mang
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 29, 2021

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:

  • items are separated by ',' need ';' instead
  • got duplicated entries

Can anyone help me how change the separator and remove the duplicates.

 

Or do you have a better idea to

1 answer

2 votes
Katerina Kovriga _Stiltsoft_
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.
October 29, 2021

Hi @Robert Mang ,

I can suggest the following workaround: wrap your table subsequently into the Table Transformer and then into the Pivot Table macro.

Fri 10-1.png

Go to the Table Transformer settings:

Fri 10-2.png

SELECT DISTINCT T1.'email' as 'Email List', T1.'ART_Role*' FROM T1
WHERE T1.'ART_Role*' LIKE "SM"

Fri 10-3.png

Here we use the DISTINCT command and select only the unique emails.

Then go to the Pivot Table macro settings:

Fri 10-4.png

Go to the Options tab and set the required separator:

Fri 10-5.png

Now when you publish the page and export the result table in the CSV format, you'll get a list separated by the ";":

Fri 10-6.png

Fri 10-7.png

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.

Katerina Kovriga _Stiltsoft_
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.
October 29, 2021

@Robert Mang , I've consulted with our developers and they have a more beautiful solution:

Fri 10-8.png

SELECT SUM(DISTINCT T1.'email' + ";")->slice(0, -1) as 'Email List' FROM T1
WHERE T1.'ART_Role*' LIKE "SM"

Fri 10-9.png

Hope this helps your case.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events