It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Reorder the dynamic fields for PocketQuery

Eugene Domingo Oct 31, 2014

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
Felix Grund Nov 04, 2014

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]

Eugene Domingo Nov 04, 2014

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.

Eugene Domingo Nov 04, 2014

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.

Felix Grund Nov 05, 2014

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 ;)

Eugene Domingo Nov 05, 2014

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

0 votes
Eugene Domingo Nov 04, 2014

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.

Felix Grund Nov 04, 2014

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

0 votes
Christian Koch Nov 04, 2014

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 ?

0 votes
Eugene Domingo Nov 04, 2014

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.

0 votes
Christian Koch Nov 04, 2014

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

0 votes
Eugene Domingo Nov 04, 2014

Yes. I been researching html on w3schools.com. 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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Marketplace Apps & Integrations

Demo Den Ep. 4: Continuous Integration with CircleCI & Jira Software

Get ready! Demo Den Episode 4 is coming your way on Tuesday, May 28, 2018 with a Continuous Integration and Delivery special demo. CircleCI Director of Solutions Engineering, Eddie Webb will show us ...

696 views 0 4
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you