How to display plain text from certain queries

I have a few queries that I cannot get to display correctly in plain text.

My query is: SELECT SUBSTR(pp_patch, 8) as " " from pp_version

It should return 2015.1.4.0, but it is returning: { =2015.1.4.0}

When I query it in the a sql tool, I get it correctly. 

I have a template that looks like this, which does remove some extra [] brackets and takes away the table formatting.

#foreach ($row in $result)
$row
#end

 

How can I fix this?

1 answer

1 accepted

Hi Philipp,

Thank you for your interest in PocketQuery! You should be able to achieve what you want using the template parameter plain. Check out the section "Template configuration parameters" in the PocketQuery documentation. I also prepared an example for you...

Query:

SELECT Code
FROM Country
WHERE Name = :Name

Template:

## @param plain:true
<h3>First row:</h3>
$result.get(0).Code
<h3>All rows:</h3>
#foreach($row in $result)
$row.Code<br>
#end

Let me know if this helps!

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
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

604 views 20 11
Join discussion

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