...
While re-directing to the child page, the $request_string variable will render the query string, i.e., ?Name=image from the browser URL. Then we have the groovy script to trim the indexes and get the value, i.e., image. This value then be used in the groovy script, which will then render and give the output as shown as
The Edit VIew:
The Groovy Script:
Code Block | ||||
---|---|---|---|---|
| ||||
import com.atlassian.renderer.v2.RenderMode def renderMode = RenderMode.suppress(RenderMode.F_FIRST_PARA) def startIndex = "$request_string".indexOf("=") def requestParam = "$request_string".substring(startIndex+1,"$request_string".length()) println("\n") println("only Value:"+requestParam) def var1 = "{sql-query:dataSource=Docker 06|table=true} SELECT * From LABEL where name = '" + requestParam +"' {sql-query}" println(var1) |
...