How is it possible to implement a variable in my Sql Plugin?

Hi all,

probably it's simple but I want to implement variables in my SQL-String. I use the SQL Plugin.

For example:


Select * from test where test_id = $example

How is it possible?

1 answer

hi andreas,

i've never used sql-plugin and i really don't know exactly what you mean but by lookin at your example code $example would be empty unless it is defined with something like:

example=$1 (this would be the first argument)
example=$(put your code here)

once this variable is defined you should be able to call $example for your query

Hey there

and thanks for your answer. When you create a global template you can create textboxes by declaring a variable with the "$" sign.

So if you type something into the created textbox you can use the input text as a variable.

So my question is: "How can I use the text from the textbox as a variable in my sql string?"

Hope this makes clearer what I want to do.

Suggest an answer

Log in or Join to answer
Community showcase
Louis De Jaeger
Posted 4 hours ago in Off-topic

Friday fun: your best joke

Hi all Lets make this Friday fun really fun and post one (or more) of your best jokes! The joke can be about an Atlassian product, or just a really fun joke you want to share! I’m not the best j...

20 views 1 2
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot