Pagination in Pocket Query resultset?

Many a times result set is huge and increases the page length, did anybody try implementing the same?

4 answers

This widget could not be displayed.

Hi Pranjal,

I had a check on this. It should be very straight-forward. I wouldn't use any library for this myself. This is my (MySQL) query:

SELECT Name, Population
FROM Country
WHERE Continent = :Continent
LIMIT :StartIndex,:PageSize

Important: this must be entered in the "Parameter Types" field: StartIndex=Integer&PageSize=Integer

In my macro, I checked the fields "Load macro dynamically", "Enable dynamic parameters" and "Use change params template". This is what I get:

image2016-9-20 11:33:10.png

With JS I can easily reload the macro for another start index:

(function() {
	var container = $('.pocketquery-dynamic-load[data-query="Pagination"]');
	var dataIndex ='index');
	var data = PocketQuery.getDynamicLoadData(dataIndex);
	data.queryParameters = { Continent: 'Europe', PageSize: 10, StartIndex: 30 };
			container: container,
			data: data

It's now very easy to build some HTML for the pagination menu. Just let me know if you need further help smile

Felix (Scandio)

This widget could not be displayed.

Hi Pranjal! Haven't heard of anyone who did this yet. Nor have I tried myself. But the possibilities are there. You can write some JS in your template and use the PocketQuery.load method with a pagination parameter. Shouldn't be so difficult.

This widget could not be displayed.

Felix, I did find something here but trying to figure out how can i implement it. I'll look into this later today and explore. If you can help me real quick, it'd be great.

This widget could not be displayed.

Solution is interesting but in our case it would be more sufficient if there would be a possibility Pranjal Shukla described the way in Are there any further possibilities?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 17, 2018 in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

602 views 8 6
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you