Reorder the dynamic fields for PocketQuery

Eugene Domingo October 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 (Scandio)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 4, 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 November 4, 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 November 4, 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 (Scandio)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 5, 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 November 5, 2014

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

0 votes
Eugene Domingo November 4, 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.

0 votes
Christian Koch November 4, 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 November 4, 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 November 4, 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 November 4, 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 (Scandio)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 4, 2014

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events