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>&nbsp;</p>
<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>

thanks,

Lawrence

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:

&lt;script&gt;
(function($) {
	var QUERY_NAME = 'yourQueryName';
	var dynamicLoadClass = 'pocketquery-dynamic-load';
	var $container = $('.'+dynamicLoadClass+'[data-query="'+QUERY_NAME+'"]');
	$container.removeClass(dynamicLoadClass);
	AJS.toInit(function() {
		$container.addClass(dynamicLoadClass);
	});
}(jQuery));
&lt;/script&gt;

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

173 views 0 4
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