Forums

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

Table Transformer Macro - Select Column If Exists

Emily Berg
Contributor
July 27, 2021

Hello!

I am trying to work through an internal issue that has some users seeing certain syntax, while others don't  For example, when I pull in the "fixversion" column field, the column name appears (to me) as 'Fix Version(s)'.  To others, the column name appears as 'Fix Version/s'.

While our IT department continues to investigate, I would like to propose a workaround - check to see if the column exists in the table.  If it does, select it for the output - I would assume this would allow all users to use the same query, while outputting the syntax that is working with their configuration.

So, to recap, I would like to rename columns in my table transformer.  And for one column I would like to use the "If Exists" query to check if it's there - and rename accordingly.  Another option would be to choose the column based on the index rather than the name (if that's possible).

Thank you!

Emily

1 answer

1 accepted

3 votes
Answer accepted
Emily Berg
Contributor
July 27, 2021

I found a solution, but please advise if you find something different!

IF EXISTS(SELECT T1.'Fix Version(s)' FROM T1)
SELECT
T1.'Fix Version(s)' AS 'TER Fix Versions'
FROM T1
ELSE
SELECT
T1.'Fix Version/s' AS 'TER Fix Versions',
FROM T1

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.
July 27, 2021

Hi @Emily Berg , 

Please check the version of the Table Filter and Charts for Confluence app - the current one is 7.7.4.

I suppose that the problem is in the browser language settings: some users have American English and some use British English. We had such requests from our customers in the past and improved the Jira Issues macro performance.

So, please, update the app and tell us if the issue is still present.

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.
July 27, 2021

And here is another more simple workaround for similar cases - please check this abstract.

But again we strongly recommend to update the app firstly.

Emily Berg
Contributor
July 28, 2021

Hi @Katerina Kovriga _Stiltsoft_ ,

My IT department has stated our current version is 7.1.13 for the Table Filter and Charts for Confluence App.  I have inquired about upgrading, but I believe they are hesitant until we can confirm it will not disrupt current production users.

Regarding the language settings, the user experiencing the problems did have English (United Kingdom) as their top preference.  She changed it to English (US) and the issue resolved.  I assume a more recent version of the app would allow the UK language to be selected?

Thank you for the insight, this is very helpful and eliminates the need to include the "COALESCE" workaround.

Emily

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.
July 28, 2021

Yeah, the Jira Issues macro with different languages was supported in the 7.3.0 version.

And later versions had other useful features like collecting page meta data via the Table Excerpt Include macro (now it can collect page name, creator, created and modified dates, etc.), dependencies for Gantt chart, etc.

It will be better to update the app.

Emily Berg
Contributor
July 28, 2021

Thank you, @Katerina Kovriga _Stiltsoft_ .

I will communicate this thread with our IT department.

Emily

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.
July 28, 2021

You may also see all the releases with new features and bug fixes listed on the Marketplace in the Releases section.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events