Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is it possible to use 2 hyperlinks without a line break between in a table transform?

Jason Dyke August 17, 2022

I have two separate hyperlinks I am trying to display without using a line break in a single column. The 2 original columns used the following code:

FORMATWIKI((SUM("[" + T1.'TER Key' + "|https://code.waters.com/jira/browse/" + T1.'TER Key' + "]\n"))) AS 'TER Key',

FORMATWIKI((SUM("[ (DIR " + T1.'SAP DIR' + ")" + "|http://sapprod1.waters.com:8000/openfile/key?N=" + T1.'SAP DIR' + "&T=" + T1.'SAP DIR Doc Type' + "]\n"))) AS 'SAP Link',

 

I am trying to combine them in a single column and display them in the format :

TER-XXX (DIR XXXXXX) where the TER-XXX is a link to JIRA and DIR XXXXX is a link that opens a SAP link.

 

I tried this:

FORMATWIKI((sum("[" + T1.'TER Key' + "|https://code.waters.com/jira/browse/" + T1.'TER Key' + "]\n" + "[ (DIR " + T1.'SAP DIR' + ")" + "|http://sapprod1.waters.com:8000/openfile/key?N=" + T1.'SAP DIR' + "&T=" + T1.'SAP DIR Doc Type' + "]\n"))) as 'test3'

but it inserts a new line after the TER link. Is is possible to get both links on the same line?

2 answers

1 accepted

4 votes
Answer accepted
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.
August 17, 2022

Hi @Jason Dyke ,

Seems that your solution is right: try to remove the first "\n" character from the query. Then it worked as was supposed for my test table.

FORMATWIKI((sum("[" + T1.'TER Key' + "|https://code.waters.com/jira/browse/" + T1.'TER Key' + "]\n" + "[ (DIR " + T1.'SAP DIR' + ")" + "|http://sapprod1.waters.com:8000/openfile/key?N=" + T1.'SAP DIR' + "&T=" + T1.'SAP DIR Doc Type' + "]\n"))) as 'test3'

Jason Dyke August 17, 2022

Hi @Katerina Kovriga {Stiltsoft} , I had tried that before. 

This is the way it looks with the \n in the code:

image.png

and this is how it looks after removing the \n:

image.png

Jason Dyke August 17, 2022

are there any alternatives to \n that would insert a space or a tab instead of a return?

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.
August 17, 2022

Please refer to our support - attach the screenshot of your table and the full SQL query from the Table Transformer macro. Smth small is missing, we'll copy exactly your code and "play" with the query to resolve the issue.

Jason Dyke August 17, 2022

This is the code in the table transformer:

 

SELECT T1.'PR Key',T1.'PR Elaborates',T1.'PR Summary',T1.'Document DIR',
T1.'TER Key',T1.'TER Summary',T1.'TER FixVersion',T1.'TER Resolution',

FORMATWIKI(sum(T1.'PR Key' + "\n")) as 'PR Key',
FORMATWIKI(sum(T1.'PR Elaborates' + "\n")) as 'PR Elaborates',
FORMATWIKI(sum(T1.'PR Summary' + "\n")) as 'PR Summary',
FORMATWIKI(sum(T1.'Document DIR' + "\n")) as 'Document DIR',
FORMATWIKI((SUM("[" + T1.'TER Key' + "|https://code.waters.com/jira/browse/" + T1.'TER Key' + "]\n"))) AS 'TER Key',
FORMATWIKI(sum(T1.'TER Summary' + "\n")) as 'TER Summary',
FORMATWIKI(sum(T1.'TER FixVersion' + "\n")) as 'TER FixVersion',
FORMATWIKI(sum(T1.'TER Resolution' + "\n")) as 'TER Resolution',
FORMATWIKI((SUM("[ (DIR " + T1.'SAP DIR' + ")" + "|http://sapprod1.waters.com:8000/openfile/key?N=" + T1.'SAP DIR' + "&T=" + T1.'SAP DIR Doc Type' + "]\n"))) AS 'SAP Link',
FORMATWIKI((sum("[" + T1.'TER Key' + "|https://code.waters.com/jira/browse/" + T1.'TER Key' + "]\n" + "[ (DIR " + T1.'SAP DIR' + ")" + "|http://sapprod1.waters.com:8000/openfile/key?N=" + T1.'SAP DIR' + "&T=" + T1.'SAP DIR Doc Type' + "]\n"))) as 'test3'

FROM T1

GROUP BY T1.'PR Key',T1.'PR Elaborates',T1.'PR Summary',T1.'Document DIR'

 

This is how the table currently looks:
image.png

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.
August 17, 2022

Still can't find the root of the issue: to show the difference beautifully I skipped showing several columns from the beginning of the query - then the width of the table on my screen allows to take a good screenshot.

 

So here is my source table with dummy data wrapped in the Table Transformer macro:

Wed 3-1.png

 

Here is my query (copied from yours but without the beginning and grouped only by the first column because I have only 3 rows with data):

Wed 3-2.png

SELECT
FORMATWIKI((SUM("[" + T1.'TER Key' + "|https://code.waters.com/jira/browse/" + T1.'TER Key' + "]\n"))) AS 'TER Key',
FORMATWIKI(sum(T1.'TER Summary' + "\n")) as 'TER Summary',
FORMATWIKI(sum(T1.'TER FixVersion' + "\n")) as 'TER FixVersion',
FORMATWIKI(sum(T1.'TER Resolution' + "\n")) as 'TER Resolution',
FORMATWIKI((SUM("[ (DIR " + T1.'SAP DIR' + ")" + "|http://sapprod1.waters.com:8000/openfile/key?N=" + T1.'SAP DIR' + "&T=" + T1.'SAP DIR Doc Type' + "]\n"))) AS 'SAP Link',
FORMATWIKI((sum("[" + T1.'TER Key' + "|https://code.waters.com/jira/browse/" + T1.'TER Key' + "]" + "[ (DIR " + T1.'SAP DIR' + ")" + "|http://sapprod1.waters.com:8000/openfile/key?N=" + T1.'SAP DIR' + "&T=" + T1.'SAP DIR Doc Type' + "]\n"))) as 'test2',
FORMATWIKI((sum("[" + T1.'TER Key' + "|https://code.waters.com/jira/browse/" + T1.'TER Key' + "]\n" + "[ (DIR " + T1.'SAP DIR' + ")" + "|http://sapprod1.waters.com:8000/openfile/key?N=" + T1.'SAP DIR' + "&T=" + T1.'SAP DIR Doc Type' + "]\n"))) as 'test3'
FROM T1
GROUP BY T1.'PR Key'

 

The difference between the 'test2' and 'test3' is in the \n character.

 

And here is the result:

Wed 3-3.png

 

The 'test3' column looks like yours, but 'test2' doesn't have an extra return.

 

I'm on Confluence Cloud as is shown via your hashtags. So, please raise a support ticket. Attach your page storage format and the team will look closer at the problem.

0 votes
Testing Test August 17, 2022

[hii]

Testing Test August 17, 2022

hello

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events