Hi,
can any one answer my question with example?
I would like to display the result on change of select box value and even in the select options will also come from database.
1. how to display the mysql records in select box?
2. how do I display the mysql results onchange of select box options?
ex: I have 3 different countries in select box like(India, Dubai & London)
when I select India it should retrieve all major city names from India,
when I select Dubai it should retrieve all major city names from Dubai,
when I select London it should retrieve all major city names from London,
can this be done using RUN and Scaffolding plugin, I'm not sure as I'm beginner.
If you provide any example will be great help.
Regards
Sudhu
Hi
I found the answer
here is the documentation
· Go to the page where you want to add drop box
· Click on edit page
· Click on Insert
· Select "Other Macros"
· Choose "Run with user form and parameters"
· On the right side of the popup window enter necessary fields.
· Eg :
· Unique id for this run macro instance = name of the macros
· Replace parameter list = " {run:autorun=true|heading=Heading text|prompt=Prompt text|titleRun=Submit|help=help page| replace=g2::hidden value:Hidden description:hidden,s1::?Location:select::India::Dubai::England"
Text which is highlighted in blue are optional parameters.
Text which is highlighted in green replace - parameters, this parameter will act like dummy parameters and some times it must be declared with any value(but hidden field will be preferred) and some times it is not required.
Text which is highlighted in red is actually the parameters for the select box, which can only be static values and it should correspond to the values in the database and is not case sensitive.
{run:autorun=true|heading=Heading text|prompt=Prompt text|titleRun=Submit|help=help page| replace=g2::hidden value:Hidden description:hidden, s1::?Location:select::India::Dubai::England
{run:autorun=true|heading=Heading text|prompt=Prompt text|titleRun=Submit|help=help page| replace= g2::hidden value:Hidden description:hidden, s1::?Location:select::india:India:dubai:Dubai:England:London
You use the Run macro to allow the user to make the selection and then SQL-query Macro to run the query against the database based on the user selected values. Start with that before doing anything with dynamically generating the choice values. Look at the Documentation and various How to's for the run macro and similarly the Documentation and How to's for the sql macro.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
can you tell me, what am I doing wrong here?
{run:autorun=false|heading=Heading text|prompt=Prompt text|titleRun=Submit|help=help page|
replace=
s1:choice value 1:?Select:select::choice value 1:choice text 1:choice value 2:choice text 2:choice value 3:choice text
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This works for me:
{run:autorun=false|heading=Heading text|prompt=Prompt text|titleRun=Submit|help=help page| replace= s1:choice value 1:?Select:select::choice value 1:choice text 1:choice value 2:choice text 2:choice value 3:choice text} $s1 {run}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Bob, however I have one more doubt regarding sql parameters.
Please find below attached image and also how do I pass region name dynamically through variable in sql query?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
?s2 isn't proper sql syntax. ? in sql represents a parameter marker. Did you mean $s2?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not sure very much, but my requirement is like below:
I have a select box where I will have couple of region, when a selection is made, the query should retrieve data based on selected value
when I select India it should pull the data which is relevant to India region, same way it applicables for rest of the regions.
please find below code which I have written:
{run:autorun=true|heading=Heading text|prompt=Prompt text|titleRun=Submit|help=help page| replace=s2:?Select:select::India::Dubai::London
select ?p1, * from AC_users where region = 'india' instead of this I want
something like below so that I can get the selected value from the select box
select ?p1, * from AC_users where region = '$region'
Thanks alot
Regards
Sudhu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Um, Bob's point is that your SQL is incorrect - ?p1 will not work, it probably should be $p1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
select * from AC_user where region = '$s2'
$s2 will be replaced by the run macro with the selected value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried even that also but for some reason it is not working.
here I'm attaching the screenshots and code which is generating select box options.
{run:autorun=true|heading=Heading text|prompt=Prompt text|titleRun=Submit|help=help page| replace=s2:?Select:select::India::Dubai::London
Please do let me know if I need to do any changes in the above code.
SQL Query :
select initials, first_name, last_name, email, region, dept from AC_users where region = '$s2'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
On the sql query macro, select parameter to "Show SQL" and see the sql statement that is being run. Then copy and paste the statement in your database specific query tool.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jira doesn't have a scaffolding plugin. That's for Confluence.
We can't really give you a decent answer to this until we know whether it's Jira or Confluence and if you really mean scaffolding or something else.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
question is tagged for confluence.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ta. It wasn't when it was first published.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.