Hello
I am trying to use a Confluence to lookup a value from a Scaffolding table, and then pass this value into an SQL macro. I was planning on using groovy for this and it is working fine, but the value that gets passed has HTML tags around it (even though I set the text field in Scaffolding to be plain text).
How can I configure this to pass the value without the <p></p>? So using the script shown below I am getting a value of <p>12345</p> passed as ${mapobjidset} when what I need is just 12345.
My groovy text is below:
=========
import com.atlassian.renderer.v2.RenderMode
def renderMode = RenderMode.suppress(RenderMode.F_FIRST_PARA)
// macro to pull the correct mapobjid value
def mapobjidMacro = """
{report-block}
{local-reporter:key=data:TestTable}
{text-filter:
key=data:WorkflowIDField
| value=PAF
}
{local-reporter}
{report-body}
{report-info:key=data:MapObjIDSetField}
{report-body}
{report-block}
"""
def mapobjidset = subRenderer.render(mapobjidMacro, context, renderMode)
// now run the SQL using the chosen mapobjid
def SQLMacro = """
{sql-query:
dataSource=DS
| noDataMessage=N/A}
SELECT
Map_MapID,
Map_Title,
Map_MapObjID
FROM
DS.WMap
WHERE
Map_MapObjID IN (${mapobjidset})
{sql-query}
"""
out.println SQLMacro=======