How to get data from a table stored on a wiki page?

Randall Johnson June 14, 2012

I want to create a table on a WIKI page containing data and then pull data out of this table to use on other WIKI pages within the same space. I have created my table page using the table-data macro but cannot figure out how to pull data from it.

Anyone know how to do this or have a reference they can point me to?

Thanks!

6 answers

1 vote
Katerina Rudkovskaya [Stiltsoft]
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 21, 2020

Hello Randall,

There are Table Excerpt and Table Excerpt Include macros in the Table Filter and Charts for Confluence app which could help you in this case.

Here's an example on how to use them:

1. Wrap your source table with Table Excerpt.

Screenshot_1.png

2. Insert the Table Excerpt Include macro on another page and configure it.

Screenshot_2.pngScreenshot_3.pngScreenshot_4.png

Result: the same table are ready for filtering, building charts, pivot tables and transformation on another WIKI page.
 

Screenshot_5.png

Please use our documentation to get more info about our app.

Katerina
StiltSoft

1 vote
Matthew J. Horn
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.
June 14, 2012

I think you're trying to do something that Confluence/static HTML is not meant to do.

That being said, are you sure you can't use jQuery? It's built in by default. If you have the HTML macro enabled, you can use it.

1 vote
Matthew J. Horn
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.
June 14, 2012

If you only want to pull out selective information from the table (for example, one row, or one cell in a row), then you could use jQuery.

0 votes
Randall Johnson June 14, 2012

When I try to use jQuery by putting {jQuery} on page, I get an unknown macro message. Not listed in macros I can insert either when using rich text edit mode with toolbar.

0 votes
Randall Johnson June 14, 2012

I don't want to replicate the table on other wiki pages, I want to selectively pull data out of table cells to display on other wiki pages.

For example, each row contains dates for a project. There will be unique project wiki pages that I want to be able to reference dates stored in a master table containing dates for all projects. This way only the master table needs to get updated and the individual project wiki pages will update based on values in the table.

jQuery is not a macro we have installed with out confluence WIKI so unfortunately that is not an option.

I tried using the get-data macro but I am not sure how to reference the cells in the table with it nor do I know if it will work across pages.

In a simple experiment I did the following all on same WIKI page:

{set-data:test_field|type=text}pickle

{get-data:test_field}{get-data}

In this example get-data retrieves "pickle". But I was not able to use get-data on another WIKI page to retrieve the test_field value.

I cannot find much info that details out how field data is handled, what is local to a page versus global to a space, how to address fields, etc.

If anyone knows how to pull data from one page to another, I would really appreciate it.

Thanks!

0 votes
Jobin Kuruvilla [Adaptavist]
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.
June 14, 2012

If that table is the only one in the page, you can use the include page macro.

https://confluence.atlassian.com/display/DOC/Include+Page+Macro

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events