Can I dynamically populate the fields of a table, based on values introduced on another table?
Asked by Marina Culeasca:

Hi,

Lets say I have two separate tables in which I keep different information regarding same items (Jira tickets) - table 1 with info about the team, start/end date, etc, and table 2 with issues encounter working with/on that ticket.

1. Can I dynamically populate some fields from table 2, with info from table 1, based on values introduced on a certain column in table 1?

I mean, if in table 1 I have a column in which I introduce YES/NO based on if I had issues or not when working with that ticket, and if the answer is YES, to dynamically populate Ticket NO from table 2, with the number of the ticket introduced in table 1

Thanks!


Answers:
author: Katerina Kovriga {Stiltsoft}
body: Hi [@Marina Culeasca](/t5/user/viewprofilepage/user-id/4124919) ,

We can suggest trying our app - [Table Filter and Charts for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?hosting=cloud&tab=overview).

Wrap your Table 1 in the [Table Excerpt](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Table+Excerpt+and+Table+Excerpt+Include+macros) macro:

![Issues 1.png](https://community.atlassian.com/t5/image/serverpage/image-id/114219i30C85FC515E968F8/image-size/large?v=v2&px=999 "Issues 1.png")![Issues 3.png](https://community.atlassian.com/t5/image/serverpage/image-id/114220i2E197F22C0172300/image-size/large?v=v2&px=999 "Issues 3.png")Then reuse your Table 1 with the help of the Table Excerpt Include macro and wrap it and your Table 2 first in the [Table Transformer](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Table+Transformer+macro) and then in the [Table Filter](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Table+Filter+macro) macro.

![Issues 2.png](https://community.atlassian.com/t5/image/serverpage/image-id/114221i79C03610ADA75DE9/image-size/large?v=v2&px=999 "Issues 2.png")Use the Table Transformer macro to look up your tables by the unique 'Key' field:

![Issues 4.png](https://community.atlassian.com/t5/image/serverpage/image-id/114222iBFB1094D45D73AE9/image-size/large?v=v2&px=999 "Issues 4.png")And set the Table Filter macro to show only rows with the 'YES' issue encounter:

![Issues 5.png](https://community.atlassian.com/t5/image/serverpage/image-id/114224iBF63DDB020D7721F/image-size/large?v=v2&px=999 "Issues 5.png")![Issues 6.png](https://community.atlassian.com/t5/image/serverpage/image-id/114225iC7C35906697EFB37/image-size/large?v=v2&px=999 "Issues 6.png")Now your result Table 2 will look as required when the page is published:

![Issues 7.png](https://community.atlassian.com/t5/image/serverpage/image-id/114226i143EFE7A78F6BED3/image-size/large?v=v2&px=999 "Issues 7.png")Note that if your Confluence hosting type is Cloud, you'll need the [Table Toolbox](https://docs.stiltsoft.com/display/public/TFAC/How+to+use+Table+Toolbox+macro) macro to nest several macros due to the new editor limitations.

comments: author: Daisy Fischlein Steffensen
body: [@Katerina Kovriga {Stiltsoft}](/t5/user/viewprofilepage/user-id/1464746) I am looking to do the same thing.. I think. Only I would like to make a table consisting of data from JIRA and one column that will be filled out manually.

I can't figure out from the example above how to do to that? The example above seems to be all manually entered data?

Can you help me?


author: Katerina Kovriga {Stiltsoft}
body: Hi [@Daisy Fischlein Steffensen](/t5/user/viewprofilepage/user-id/1546217) ,

The basic conception is the same: you insert the Table Transformer macro and wrap two tables inside its body - the Jira Issues table and an additional manually created table for your comments.

![Wed 1-1.png](https://community.atlassian.com/t5/image/serverpage/image-id/119594i1D9DBFDD07199570/image-size/large?v=v2&px=999 "Wed 1-1.png")To lookup the tables, you'll need a unique field. As we don't use any custom fields, I choose the standard 'Key' field to serve this purpose.

Now go to the Table Transformer macro settings and enter the following custom SQL query:

SELECT T1.'Key', T1.'Summary', T1.'Created', T1.'Assignee', T1.'Status', T2.'Manually Added Comment' FROM T1 JOIN T2 ON T1.'Key' = T2.'Key'

As you can see, the query is very simple: you define the columns (and their order as well!) that you want to show in the result table and lookup the two tables by the 'Key' column.

![Wed 1-2.png](https://community.atlassian.com/t5/image/serverpage/image-id/119595i30BD9DA9960E420E/image-size/large?v=v2&px=999 "Wed 1-2.png")And here is the result when the page is published:

![Wed 1-3.png](https://community.atlassian.com/t5/image/serverpage/image-id/119596i9FBDCDF7A6A30BBA/image-size/large?v=v2&px=999 "Wed 1-3.png")Hope this helps.


author: Daisy Fischlein Steffensen
body: Thanks I made it work.. only some of my colleagues has their default browser language set to "Danish".

That means that the JIRA column "Key" is translated to "N?gle".. this ruins the mapping between the two tables.

It looks correct for me, because my browser language is English.

Do you have any suggestions on how to handle that, so everyone viewing the table will see the table correctly?


author: Katerina Kovriga {Stiltsoft}
body: [@Daisy Fischlein Steffensen](/t5/user/viewprofilepage/user-id/1546217) , modify your SQL query a little bit to check both variants of the "Key" field:

*Previous version*

SELECT **T1.'Key'** , T1.'Summary', T1.'Created', T1.'Assignee', T1.'Status', T2.'Manually Added Comment' FROM T1 JOIN T2 ON **T1.'Key' = T2.'Key'**

*New version*

SELECT **COALESCE(T1.'Key', T1.'N?gle') AS 'Key'** , T1.'Summary', T1.'Created', T1.'Assignee', T1.'Status', T2.'Manually Added Comment' FROM T1 JOIN T2 ON **COALESCE(T1.'Key', T1.'N?gle') = COALESCE(T2.'Key', T2.'N?gle')**

Besides with the function **COALESCE(T1.'English field name', T1.'Danish field name') AS 'English field name'** you can check other Jira fields (such as Summary, Created, Assignee, etc.) so that they will be shown despite the language settings and in English. It seems that other fields are also translated in Danish for your colleagues, so you need to modify the query for them as well.


author: Trina Peck
body: [@Katerina Kovriga {Stiltsoft}](/t5/user/viewprofilepage/user-id/1464746) I'm looking at this second answer using the Table Transformer macro you provided to Daisy. My question for you is how did you populate the Key column in T2?


author: Katerina Kovriga {Stiltsoft}
body: The Key column in T2 is populated manually - you type in the issue key in the first column and some comments and other notes into other columns.

T2 shouldn't always match T1. For example, you may have 10 rows (10 issues) coming from the Jira Issues macro. But you want to leave comments only for the two specific issues. So, your T2 will consist of the header row and two data rows (the keys of these two issues and your comments).


author: Kapil Podduturi
body: Hi [@Katerina Kovriga {Stiltsoft}](/t5/user/viewprofilepage/user-id/1464746) , can the above be achieved without using the addon on the cloud version?

My client is a Gov agency and to get approvals to add any addons is very tedious.

Appreciate your help.

Thank you.


author: Stiltsoft support
body: Hi [@Kapil Podduturi](/t5/user/viewprofilepage/user-id/4124691) ,

I'm not sure that it's possible natively. The closest hit may be just to reuse one of the tables via the standard Excerpt/Excerpt Include macros and view the two tables on one page but without merging them.

Or you may work, for example, in Excel and then use the Excel macro or copy/paste your result table in Confluence manually.


author: Kapil Podduturi
body: Thank you for your reply.


author: Luana da Silva Machado
body: Hey,

Do you know if I can add a live search in a table imported from Jira?  
Since the info is not actually In Confluence I cannot search directly in the Confluence search field. Is there a macro or a plugin or something that allows me to do that?

Thank you


author: Katerina Rudkovskaya [Stiltsoft]
body: Hi [@Luana da Silva Machado](/t5/user/viewprofilepage/user-id/5204192),  

In this thread we are talking about our [Table Filter and Charts for Confluence](https://marketplace.atlassian.com/apps/27447/table-filter-and-charts-for-confluence?tab=overview&hosting=cloud&utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) app. Its macros support the Jira Issues macro as well. So, for the case, you may wrap the Jira Issues macro in the [Table Filter](https://docs.stiltsoft.com/tfac/cloud/how-to-use-table-filter-macro-42239756.html?utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111) macro and set the required filters (free text, date range, dropdown).If you are not familiar with the app, we'll be happy to arrange a live demo for you and your team. Please book a suitable time slot [here](https://calendly.com/tablefilter/live-demo?month=2023-08).


author: Stiltsoft support
body: **An update from our side:** our new Spreadsheet from Table macro (that belongs to our spreadsheet family - you [may check it here](https://spreadsheets-for-confluence.stiltsoft.com?utm_source=atl_community&utm_medium=answer&utm_campaign=table-filter-traffic-sources&utm_vendorID=1216111)) supports macro generated tables.

So, you'll be able to turn your Jira Issues and Page Properties Report macro in a live spreadsheet and continue to work with all the basic Excel-like features (filtration, cell formulas, conditional formatting, etc.).


author: Shivani Gour
body: [@Katerina Kovriga {Stiltsoft}](/t5/user/viewprofilepage/user-id/1464746)   

How to merge a Jira snapshot and a manual table together in Confluence page?

comments: author: Stiltsoft support
body: Hi [@Shivani Gour](/t5/user/viewprofilepage/user-id/5439900) ,

As far as we understand, you are referring to another [3rd party app](https://marketplace.atlassian.com/apps/1225123/jira-snapshots-for-confluence?hosting=cloud&tab=overview) that creates snapshots from Jira. Maybe you should apply to their support.


author: Shivani Gour
body: Hi I am talking about below element on Confluence and I want to merge a manual table with this

![iScreen Shoter - 20240227230551832.png](https://community.atlassian.com/t5/image/serverpage/image-id/308971i34F7EBAFF41F0E8F/image-size/large?v=v2&px=999 "iScreen Shoter - 20240227230551832.png")![iScreen Shoter - Google Chrome - 240227230526.png](https://community.atlassian.com/t5/image/serverpage/image-id/308970i794F70978AC52617/image-size/large?v=v2&px=999 "iScreen Shoter - Google Chrome - 240227230526.png")


author: Stiltsoft support
body: So, visit the link given in the reply above and refer to their support.


author: sridhar vaidyanathan
body: Hello,   
I followed the instructions on getting an additional column added to JIRA. However, the JIRA issue/filter macro doesn't render cleanly when I am in edit mode. This makes is harder to create a duplicate table with the relevant keys, while I am in edit mode. How do I overcome this?

![Screenshot 2023-09-19 143315.png](https://community.atlassian.com/t5/image/serverpage/image-id/281591iB6BFA30ECB16EA00/image-size/large?v=v2&px=999 "Screenshot 2023-09-19 143315.png")

comments: author: Stiltsoft support
body: Hi [@sridhar vaidyanathan](/t5/user/viewprofilepage/user-id/5137415) ,

Unfortunately, this is the way the Jira Issues macro works.


author: sridhar vaidyanathan
body: Thanks. I am curious how to get the view that [@Katerina Kovriga {Stiltsoft}](/t5/user/viewprofilepage/user-id/1464746) response shows:  

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


author: Stiltsoft support
body: The screenshot was taken for Confluence Cloud, that's all - there are no any special settings for the macro.

For Data Center/Server the macro is always shown as on your screenshot:

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


Tags: filter

ms-excel

table

table-filter

table-filter-and-charts

table-filter-charts-spreadsheets

table-spreadsheet