How to identify a pocketquery macro of a page in a template?

I have a function in a template to "reload" all the pocketquery macros existing in a page passing new parametters... the problem is that for some of them I have independent templates with some specific functions manipulating some data that are not working with this approach... Thus I intend to bypass that incorporating those functions in the "main" template of the page using the next code.... BUT... how can I identify a PocketQuery name of one of those macros in order to use some "IF" to manipulate ony the data of the macro that is focused???

Should it be something like IF Pocketquery ('index).name THEN xxxxxx but I do not arrive to find the good code to discriminate the macro that I have to manipulate...

I note hereafter part of the code of the function I use to reload the macros.

Any help will be welcome!

Thanks in advance!


var newParameters = { ISDTI: jQuery('#select-isdti').val(),Type: jQuery('#select-type').val(),Annee: jQuery('#select-annee').val(),Mois: jQuery('#select-month').val(),Uno: 1 };
jQuery('.pocketquery-dynamic-load').each(function() {
    var container = jQuery(this);
    var dataIndex ='index');
    var data = PocketQuery.getDynamicLoadData(dataIndex);
    data.queryParameters = newParameters;
        container: container,
        data: data



3 answers

1 accepted

0 votes
Accepted answer

Hi Cuto!

If your macros are for different queries, you can simply target your containers like so:


Then you don't need an each loop but you target every container you want to reload separately.

Regards, Felix

Many thanks again Felix!

Is this also valid when the macro is not "dynamicload"? I try to apply this to one macro in a page that I use as a "basis" for filtering others being the other macros "dynamicload" and I find no way to update it with new parametters to be later used as filters...

Thanks in advance!

Hmm. You want to update a PQ macro without dynamic load? You mean that this would refresh the page with dynamic parameters?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Agile

Are you a Jira Service Desk agent? We want to talk to you!

Are you a whiz at handling tickets and looking at how you can further optimize your workflow with automation? Do you tackle detailed customer support questions while simultaneously getting flooded wi...

24 views 0 2
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