The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.
Forum Discussion
Tom
2 years agoNew Contributor III
Parameter for SQL
When I have a BR, and need to pull in a parameter, I use the following statement or one similar, I create the parameter in a Dashboard.
'Dim scenario As String = BRApi.Dashboards.Parameters.GetLite...
- 2 years ago
Tom - Assume the below is the parameter in the BR
Dim Date As String = BRApi.Dashboards.Parameters.GetLiteralParameterValue(si, False, ParamName) In the SQL You will be calling the String WHERE SQL COL NAME = '" & Date & "'"The ParamName is created in the Dashboard Parameter.
Hope this helps!
Krishna
2 years agoValued Contributor
Tom - See below in Parameters This is a connector rule example. WHen you are calling SQL inside the BR.
' Dim wfYear As String = periodName.Substring(0,4)
' Dim wfMonth As String = periodName.Substring(5)
'Where Clause
whereClause.Append("WHERE YEAR = '" & wfYear & "'")
whereClause.Append("AND PERIOD ='" & wfMonth & "'" )
- Tom2 years agoNew Contributor III
Thanks Krisna,
I was thinking of creating a parameter like "As of Date", and not a workflow parameter, and then bringing in my parameter into the SQL, right now SQL does not recognize the Parameter.
- Krishna2 years agoValued Contributor
Tom - As of Date is a column in your DB ? then you are trying to pass the param in SQL, if so Did you try calling it Data Adapter first? to see it is working. Then you can hardcode the value in BR.
In my Previous response it is just an example of how you can Call the parameters.
- Tom2 years agoNew Contributor III
I currently have the value hardcoded in the SQL, but wanted to create a parameter if possible. Thanks for your help, I really appreciate it.
Related Content
- 2 years ago