Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Retrieving Latest Data from Inside a Table or Repeating Section


Basically I am trying to do as per this tutorial:

But instead of getting item 0 (from the bottom of the list), I want to get the top or the latest item in the list. I do NOT know how many items will be in the list so can not use a fixed value. Is there a variable that accomplishes this in Confluence?

It seems a simple question but I can't find the answer documented anywhere.


4 answers

Try below to get the last/latest row in the table

data:<table name> > collection:last > data:<column name>

Hi guys,

Does anyone else have any ideas on this?

This problem blocks a large chunk of work we were planning. It is such a frustrating simple requirement I can't believe a solution doesn't exist!

Thanks in advance for any help.

0 votes
Zak Laughton Atlassian Team Mar 05, 2019

Hi Ian,

I'm not familiar with this plugin, but had a thought. Putting it here in case it helps: Typically when there's array of objects starting with 0 in a programming language, you can usually access the last item with "-1". This may be following the same logic.

Does -1 work to pick the last object?

– Zak

Hi Zak,

Thanks a lot for the suggestion! That was one thing I hadn't tried yet.

Sadly it didn't work though...

I also tried size, length, max, top, but none work.

The other thing I tried is changing the "Order" property of the "Repeating Data" macro. Sadly this just changes the order the items are drawn, not the order they are stored so 0 is still the oldest data.

Summary: There must be a variable counting the number of Data blocks added here but really can't find it in any documentation.

0 votes
Marty Atlassian Team Mar 04, 2019

Hi Ian,

I am not on the Confluence team but I will try to help.

It sounds like what you are trying to do is create a Dynamic Table?

Thanks for your reply.

Yes: either a dynamic table or repeating data block, I guess it works the same.

The key part is I then need to use GetData macro to get data from the fields. As per the original tutorial I linked, it is easy to get the "last item" (item 0) from the table. But I want to get the "first item" or the most recently added. I don't know how many rows are in the table (or blocks in the repeating macro) so it must be a variable rather than a fixed value.

So summary: I want to do the above but "name = repeat.size.repeatText".

Any further help is appreciated.


Like Marty likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

Confluence: Where work and wellness meet

Feeling overwhelmed by the demands of work and life? With a 25% increase in the prevalence of anxiety and depression worldwide during the pandemic, for most of us, it’s a resounding yes . 🙋‍♀️ ...

938 views 14 27
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you