Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×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?
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'
Hi @Katerina Kovriga _Stiltsoft_ , I had tried that before.
This is the way it looks with the \n in the code:
and this is how it looks after removing the \n:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
are there any alternatives to \n that would insert a space or a tab instead of a return?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
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):
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:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
[hii]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hello
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.