Forums

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

Using Table filter can i define default sort for tables in confluence

Sandhya Srinivasan
Contributor
September 28, 2020

Created Tables in a confluence page

wrapped the table with table filter macro

Specified default sorting in the table view tab

Click on Save

Q1. unable to see the table getting sorted as specified.

Q2. if I enter more rows with values in the tables, will sort be retained.?

 

1 answer

1 vote
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.
September 28, 2020

Hi @Sandhya Srinivasan

For Q1: It is not an expected behavior for the macro. As I understand, you sort a manually created table, not the macro generated one (if I am wrong, please, specify the macro then). After hitting the Save button, the sorting should be saved. Try to experiment with other columns/tables.

If the bug is still here, please, raise a support ticket and attach the page storage format - we'll recreate the page with your table and try to fix the issue (go to the right upper corner of the page -> ... -> View Storage Format).

For Q2: Newly added rows will be sorted immediately as is specified in the macro body.

The macro settings:

Sort 1.pngAdding a new row:Sort 2.png

The published page:

Sort 3.png

Sandhya Srinivasan
Contributor
September 28, 2020

Thanks for your help.

Yes, I manually created the table.

Also, I had the header with some merged column cells. I think there is a problem with the instance we have in our organization.

i see my tables like this now: Table header upside down. Sort did not happen.

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.
September 28, 2020

The problem is in the merged headers - there are several difficulties with them in Confluence. Try the following workaround: wrap your table in the Table Transformer macro (don't make any changes in the settings) and then in the Table Filter macro with the default sorting.

Sort 5.pngSort 6.pngThe Table Transformer macro will adjust your complex merged headings into the simple ones and the default sorting will be applied as usual.

Sandhya Srinivasan
Contributor
October 3, 2020

I did exactly what you have said..

i am not able to understand where the problem is.. see my tables below

image.png

And this is how it shows after saving. Long table headings..

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.
October 3, 2020

Hi @Sandhya Srinivasan ,

You've done everything right - the problem is that tables with merged cells are unsortable in Confluence. Here is their ticket where you can vote for the issue.

The Table Transformer macro helps to separate merged headings (see my previous screenshots and your own table - it is the reason that your headings are long, they are not merged and become sortable).

You can also exclude the Table Transformer macro and rearrange your headings manually so that there will be no merged cells.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events