Reorder the dynamic fields for PocketQuery

I'm sure this is done in the template portion.  Unfortunately, I'm not very well experienced in that field.  I want to be able to rearrange the order of the dynamic fields as they current run left to right in no particular order (not even based on when I created the user parameter).  How would I create a template to place the dynamic fields in any order I want? 

And as extra credit, how can I get them to go top to bottom instead of the left to right format?

6 answers

1 accepted

0 votes
Answer accepted

Hi Eugene!

Let me first direct you to our article PocketQuery Templating, because it help you pretty much with what you're looking for. If you have further questions, feel free to ask here.

Regards, Felix [Scandio]

I tried copying and pasting Example 4 into a template and it doesn't work right. The problem I see is that the dynamic fields are duplicated. I remove the last line, $PocketQuery.template("default"), and the fields are no longer duplicated but then the query fails to return results. It works when that line is there though. I'm having a hard time figuring out how to get the fields to send the query. When I create my own template, I hit Change, the page refreshes with the default values again and does not produce results. I just can't seem to be able to pass the variables.

I seem to have found a workaround. Not sure if it's meant to work like this. I took that template, cut and pasted, and in the macro, I selected "Enable dynamic parameters" but unselected "Use change params template". I think what it's doing is using the template I created and still executes the default template but it's just not shown on the page.

This is actually not a workaround but desired functionality. If you have a custom template that somehow defines its own "dynamic change" mechanism, you won't need the "Use change params template" parameter ;)

Yes. that's what I've done. It's starting to make more sense now. Thanks.

Thanks.  What I've figured out is basically all in html coding.  I'm still new to html coding so I've had to ask around for the syntax to customize the look of the page.  That seems beyond the scope of your Templating page.

Yes, our article won't cover an introduction to HTML ;)

To rearrange the columns in a table is'nt it easier to change the SELECT statement from SELECT * FROM table to SELECT fieldA, fieldC, fieldB FROM table ?

Ya. If I use the order by default, your right, I can probably just change the order in the query. But I would like to be able to place dynamic change parameters wherever I want and line them up. The default template places it left to right and all the way across the page. I have about 8 fields and wanted them, for example, in 4 rows of 2.

This ist only possible with templating and you need know-how in Velocity and HTML/CSS. Try to copy examples from the documentation.

Yes. I been researching html on I have my query template done as far as formatting goes. I just need to figure out how to get that info into a query.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 13, 2019 in Marketplace Apps

Marketplace Spotlight: Marketing apps for Confluence to keep your teams working on the same page


280 views 0 7
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