Help joining tables

Pete Randall September 29, 2023

I am trying to join the outputs of a Page Properties Report with a Document States Report (I think this is part of the Comala Document Review tools) to combine some headline information for a set of pages with their review status. I previously had these as two tables on the same page, but it is a pain to cross-reference between them so I thought I'd dabble in more advanced Confluencing (being a complete novice).

On my summary page, I have put a Table Transformer object containing two Table Exerpt objects, the first containing the page properties report, and the second containing the Document States Report. The outputs of both these reports always includes a 'Title' column for the page it refers to.

For the Table Transformer, I use the SQL:

SELECT * FROM T1 OUTER JOIN T2 ON T1.'Title' = T2.'Title' 

When I load the page, I briefly get a pink error box stating "TypeError: Cannot read properties of undefined (reading 'columns'), before what looks like a correct table loads.

Additionally, there seems to be a knock-on effect. My pages being summarised are created from a template, and I had added a button to do this on the summary page. When I now press the button, the process hangs on the template listing panel without showing any templates or progressing to a new blank page.

Am I doing something wrong?

Atlassian.png

2 answers

1 accepted

3 votes
Answer accepted
Katerina Rudkovskaya [Stiltsoft]
Atlassian Partner
September 29, 2023

Hi @Pete Randall,

Please check what version of the Table Filter and Charts for Confluence app you use. The current one is 10.0.0 for Server/Data Center, so if yours is an older one, please ask your Confluence administrator to update it.

If you are on Cloud and use the old editor (it’s more likely you have Server/Data Center, cause I can partly see the version on the screenshot, but for other users who may come across this question), please check if you see the Spreadsheet from Table (not Table Spreadsheet or Table Spreadsheet Include but Spreadsheet from Table) macro in your macro browser. If yes, then you are all good. If no, please ask your Confluence administrator to update the app manually.

We’ve recently had a major release, so for Cloud you need to update the app manually just once. After that you’ll continue to get all the updates automatically.

Then check if the issue persists.

If yes, then you may check where the macro sequence breaks. Your error means that the Table Transformer macro can’t see the columns mentioned in the SQL query.

I mean publish the page only with your Page Properties Report and Document States Report and confirm that you can see everything correctly. Then you may wrap these macros in the Table Excerpts and publish the page again: I see that you checked the “Hide source table” for the second Table Excerpt, uncheck this option – we don’t need it as we have the Table Transformer macro later. So, again you should see two tables.

Then you may wrap everything in the Table Transformer macro and check that it “sees” your tables: you type in T1. and T2. and wait for the hint. You should see the T1.’Title’ and T2.’Title’ options.

What concerns the templates button, I really can’t see how it relates to your tables and macros as for now.

So, if the issue persists after you update the app and check the macro sequence, you may refer to our support. Attach the page storage format (upper right corner -> menu … -> View Storage Format) of your master page and 2-3 child pages from where you pull your info. We’ll be able to recreate exactly your data and macro settings and investigate the issue.

If you don’t see the View Storage Format option in the menu, ask your Confluence administrator to do it for you.

Pete Randall October 2, 2023

Hi Katerina,

thanks for your post. I'm not a Confluence admin (and don't know who is!), but I think the Table Filter & Charts is v9.12.0 as it shows the version when adding a Table Filter macro to a page.

I suspect we are on server/data centre, based on the URLs involved (they are company-internal, and not in Atlassian domains).

I only see "Table Spreadsheet" in the macro list - no "Spreadhseet from Table". Overall, looks like our plugin needs updating, at least. I can try asking, although don't know how far I'll get with that...

For the other steps - publishing them as individual tables works. But my whole rationale is to avoid the cross referencing between the two tables. 

If I untick the "hide source table" then the behaviour is the same, but the display is of two tables. Gradually adding them back in to the Table Transformer macro, the SQL editor does perform the hinting as you describe.

Rather oddly, though, I amended the Table Transformer and instead of specifying the SQL I relied on the built-in "merge" options for the outer join. The SQL is then updated to:

SELECT * FROM T1 OUTER JOIN T* ON T1.'Title' = T*.'Title'

Which is arguably more generic, but seems to resolve the issue as the table now displays correctly without going through the intermediate pink-error message step.

Slightly confusing as they look syntactically identical for the 2-table scenario.

 

Button still broken, though, I will try recreating the template...

Many thanks,

Pete

Stiltsoft support
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 2, 2023

Hi @Pete Randall ,

Yes, please ask your management to update the app - otherwise your Confluence instance won't get the new macro.

What concerns the updated query and the disappearing mistake, without the page storage we can only guess that the T2.'Title' is a more strict query, so when you update the page there is a millisecond of delay before the Document States Report loads and the Table Transformer macro just doesn't see the second table.

The T*.'Title' is not a strict query, so the macro checks if there are any tables besides T1 in its body and during this check-up the second table is successfully loading and then merging.

Still no any ideas regarding the button, we use smth similar in our local Confluence and there are no cases that our macros somehow interfere with it.

So, please refer to our support after the app's update - we'll look into the issue.

Pete Randall October 2, 2023

Thanks for the explanation.

Further odd behaviour - I can make a button that works in a child page below the summary page, and equally the "..." button next to "Create" on the Conf page also allows me to select a template to create a new page beneath the child page. But neither of these methods work on the summary page. I may delete all and try again from scratch (at the moment they're only test pages, so no great loss).

Update: Deleting it all and starting the summary page from blank, I can add the button and it works. When I then add the Table transformer that contains two tables - the Page Properties Report and the Document States Report then the Create button ceases to function - specifically it's when the Document States Report is added inside the Table Transformer.

Stiltsoft support
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, 2023

Can't elaborate more without tests using your page storage format.

Maybe the issue is in the compatibility of the two apps: the Document States Report is not our macro. We support all the standard Confluence macros and try to support other vendors as well but there might be some changes in their apps that we are not aware of.

Please check if everything works well without the Document States Report (try to replace it with a manually created table and check the behavior).

0 votes
Adriana Lamberti
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 19, 2023

Trello me abre los tableros sin el panel izquierdo, o sea sin la lista que tiene opciones como "Unirse", "Añadir Archivos", etc
Como hago para resolver esto? Borre el cache, habilite cookies, etc (perdon la falta de acentos pero tengo el tablero en ingles para estudiar programacion)
Desde ya muchas gracias!
Adriana Lamberti 
aclamberti@hotmail.com
alamberti677@gmail.com

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events