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
