PocketQuery: How to Escape & in Parameters

I have a pocket query that I have set up as follows:



select *

from table(devpromo.PROMO_CONFIGURATION(:promo_code, :promo_sequence, :environment)) a


Parameter Types:



The following Parameters are being submitted via the form.


Param1:    FIOS BB & FIOS

Param2:    13

Param3:    CPLMS


This is what the debug shows as what was submitted.

Debug information.


Query parameters: [environment=CPLMS promo_code=FIOS BB promo_sequence=13 ]

User: Miller, Tim

Page: Promotion Trouble Shooting Inquiries

Query execution time: 2094 ms

Template parameters: []


For some reason it is dropping everything from the & on in the Param1. 


I've searched through google and atlassian answers and can not find anything except on your blog it mentions the following:

  • Special characters & and = could previously not be used in query parameters.


We have version 2.1.2 installed.


Any ideas on how I make it so the & is passed through in the string and doesn't cause it to stop at the & in the string?


Thanks for any help!


1 answer

Hi Tim,

This has actually been an issue before PQ 2.1. It originated in this post: https://answers.atlassian.com/questions/38382530. But this issue was actually fixed with 2.1 and I cannot reproduce that issue any more. What I tried...

I have a table with countries and one country name is "Trinidad & Tobago". I wrote this query:

SELECT Name, Population
FROM Country
WHERE Name = :Name

In the macro I enter "Trinidad & Tobago" for the parameter "Name". The result is the correct one with the "Trinidad & Tobago" row.

Then, I added your query in the PocketQuery admin:

select *
from table(devpromo.PROMO_CONFIGURATION(:promo_code, :promo_sequence, :environment))

I entered the parameter values as you suggested, but I don't get the behaviour with the cut-off value for promo_code:

image2016-11-5 8:58:10.png

Are you really sure you are running on PocketQuery 2.1.x?

Best, Felix (Scandio)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

479 views 8 28
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