Hi,
Can anyone help me to generate choice values using SQL, I tried with the example which is there in the documentation but that is not working for me.
Please find below code and Link I have referred.
https://bobswift.atlassian.net/wiki/display/RUN/How+to+generate+choice+values+using+SQL
{groovy:output=wiki}
import com.atlassian.renderer.v2.RenderMode
def renderMode = RenderMode.suppress(RenderMode.F_FIRST_PARA)
def choiceSql = 'select first_name from AC_users'
def choiceMacro = '{sql-query:datasource=acpdatabaseDS|table=false} ${choiceSql} {sql-query}'
def choices = subRenderer.render(choiceMacro, context, renderMode)
{run:autorun=true|replace=Name:?Select:select::${choices}}
{sql-query:datasource=acpdatabaseDS} select * from AC_users {sql-query} {run}
If I execute the above code, I'm getting out put like below
First, I always recommend when doing more complex things to break it down and make sure each part works as expected, then put it together to get everything working together. In this case
Specifically to your example here:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.