Is it possible to use 2 hyperlinks without a line break between in a table transform?
Asked by Jason Dyke:

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?


Answers:
author: Katerina Kovriga {Stiltsoft}
body: Hi [@Jason Dyke](/t5/user/viewprofilepage/user-id/5009383) ,

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'

comments: author: Jason Dyke
body: Hi [@Katerina Kovriga {Stiltsoft}](/t5/user/viewprofilepage/user-id/1464746) , I had tried that before.

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

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/211475i5C9FA5D45921BB66/image-size/large?v=v2&px=999 "image.png")

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

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/211476iD0A2CE4D288B006C/image-size/large?v=v2&px=999 "image.png")


author: Jason Dyke
body: are there any alternatives to \\n that would insert a space or a tab instead of a return?


author: Katerina Kovriga {Stiltsoft}
body: Please refer to our [support](https://jsd.stiltsoft.com/servicedesk/customer/portal/2) - 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.


author: Jason Dyke
body: 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](https://community.atlassian.com/t5/image/serverpage/image-id/211484i7B9895756D11185C/image-size/large?v=v2&px=999 "image.png")


author: Katerina Kovriga {Stiltsoft}
body: 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](https://community.atlassian.com/t5/image/serverpage/image-id/211508iBE1266D92DE87982/image-size/large?v=v2&px=999 "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](https://community.atlassian.com/t5/image/serverpage/image-id/211509iF1D8F2AF8D0A1AE0/image-size/large?v=v2&px=999 "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](https://community.atlassian.com/t5/image/serverpage/image-id/211510i17A6B15BCAF1EA5E/image-size/large?v=v2&px=999 "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](https://jsd.stiltsoft.com/servicedesk/customer/portal/2). Attach your [page storage format](https://community.atlassian.com/t5/Confluence-questions/Confluence-Storage-Format-Cloud/qaq-p/1192202) and the team will look closer at the problem.


author: Testing Test
body: \[hii\]

comments: author: Testing Test
body: hello


Tags: cloud

confluence-cloud