Confluence Data Center Question on Table Transformer Macro
Asked by Dolly Kirubavathi:

I have an attribute in Jira that is a multi-select text. The values could range from 1 to several in that attribute.

I am trying to show this attribute in the table transformer macro. Since the field is too long, it takes up the whole page for showing one row. Is there a better way to show it? may be like ... three dots and then when they click on it, show the entire text just like we have it in Jira list display?


Answers:
author: Stiltsoft support
body: Hi [@Dolly Kirubavathi](/t5/user/viewprofilepage/user-id/4580082) ,

You may try the following workaround for the case:

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

Then you use this SQL query to create a tooltip for the 'Col 2' that you need to cut. The tooltip will contain all the original cell contents:

SELECT 'Col 1',  
FORMATMARKDOWN("\[" + 'Col 2' + "\](# \\""+ 'Col 2'+ "\\")") AS 'New Col 2'  
FROM T\*

Then you go to the Stylesheet tab, set a specific cell width and make your cell contents look like text:

td a {  
display: inline-block;  
width: 40px;  
white-space: nowrap;  
overflow: hidden;  
text-overflow: ellipsis;  

color: inherit;  
text-decoration: none;  
//pointer-events: none;  
cursor: default;  
}

The result will be similar to your initial request:

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

comments: author: Dolly Kirubavathi
body: Thank you! Will try it out


author: Dolly Kirubavathi
body: What is a stylesheet tab? I have changed my SQL query like the above. It is the second part I am not clear where I am supposed to do:

td a {  
display: inline-block;  
width: 40px;  
white-space: nowrap;  
overflow: hidden;  
text-overflow: ellipsis;  

color: inherit;  
text-decoration: none;  
//pointer-events: none;  
cursor: default;  
}

Please help!


author: Dolly Kirubavathi
body: I am not the Admin. I don't have access to my space properties


author: Stiltsoft support
body: It is just a tab inside the Table Transformer macro (the 6th tab on my screenshot: Presets, SQL query, ChatGPT and so on).

You need to paste the code there.

P.S. If you don't see the tab, it means that your version of the app is an outdated. You need to ask your Confluence administrator to update it.

The current version is 11.3.0.


author: Dolly Kirubavathi
body: I see it and it works!

thank you!


author: Dolly Kirubavathi
body: Question: It looks like my hyperlinks that are other fields in the table transformer macro no more work when I put in this code in the stylesheet tab. Is there a property I need to set or something?


author: Stiltsoft support
body: Hi [@Dolly Kirubavathi](/t5/user/viewprofilepage/user-id/4580082) ,

Yes, the current styles are applied to the whole table, so if you have other links, they may be affected.

To make the styles work only for the specific column, you may use two options:

Option 1

**td:nth-child(2) a** {  
display: inline-block;  
width: 40px;  
white-space: nowrap;  
overflow: hidden;  
text-overflow: ellipsis;  

color: inherit;  
text-decoration: none;  
//pointer-events: none;  
cursor: default;  
}

Here the "2" index is a number of your column in the table. For my example, it is the second column in the table, so I have "2".

Option 2

**td a\[href="#"\]** {  
display: inline-block;  
width: 40px;  
white-space: nowrap;  
overflow: hidden;  
text-overflow: ellipsis;  

color: inherit;  
text-decoration: none;  
//pointer-events: none;  
cursor: default;  
}

Here we set an argument for the "a" class to find the links that we have set in the SQL query (there was a part "\](# \\""+ 'Col 2'+ "\\")").

You may choose any option you like.


author: Dolly Kirubavathi
body: Yes! it works! thank you!


Tags: cloud

filter

table

table-filter

table-filter-and-charts

table-filter-charts-spreadsheets

table-transformer