Pocket Query: Is there a way to disable automatic query execution when the page is loaded?

  1. Whenever we load a PQ page, the query is automatically being run. Is there any way to disable this? We would like to have empty parameters for the user to specify to do query searches. This is something that we would not like to hard code/ specify but much rather leave blank for the user to input.

2 answers

Hi Lawrence,

Very good point, I'm wondering why I didn't come up with this idea on my own. So thanks at the first place. I put this on the list of features for PocketQuery 2.1 which we plan to released in late February.

If this is important for you, I could provide you a workaround until now. Question: do you only have one PocketQuery or multiple in your page? Could you paste me the storage format of the page?

Regards, Felix

Hey Felix,

Thanks for letting me know. I would love a work around. This would possibly be for a single and/or multiple PQs on the page.

Storage format:

<p><ac:structured-macro ac:macro-id="de1923b2-922c-483e-b68a-d9f4d674115e" ac:name="pocketquery" ac:schema-version="1"><ac:parameter ac:name="name">MOATEnable</ac:parameter><ac:parameter ac:name="dynamicload">true</ac:parameter><ac:parameter ac:name="includereloadbutton">true</ac:parameter><ac:parameter ac:name="includechangetemplate">true</ac:parameter><ac:parameter ac:name="parameters">partnerid=4&amp;ToC=4</ac:parameter><ac:parameter ac:name="allowgetparams">true</ac:parameter></ac:structured-macro></p>



Hey @Felix Grund (Scandio), just checking up to see if you were able to get a workaround for this, thanks

Hi Lawrence,

You could try the following as a temporary workaround.

Enter this code at ConfluenceAdmin > Custom HTML > At end of the BODY:

(function($) {
	var QUERY_NAME = 'yourQueryName';
	var dynamicLoadClass = 'pocketquery-dynamic-load';
	var $container = $('.'+dynamicLoadClass+'[data-query="'+QUERY_NAME+'"]');
	AJS.toInit(function() {

In the code, replace yourQueryName with the name of your query.

Works for me with PocketQuery 2.0.3. We'll add a proper feature for this soon, somehow.

Let me know if this works!

Regards, Felix (Scandio)


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

441 views 8 26
Read article

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