Using standard substitution variables in Business Rules; Example: |CVYear|
How can we reference substitution variables like |CVYear| in a Business Rule? These variables are great for Cube Views, but now I'd like to access it directly in a Business Rule (custom calculate).
Dim ExampleCVYearDataBuffer As DataBuffer = api.Data.GetDataBufferUsingFormula( "T#[CVYear]" )
Error processing Data Management Step 'Enrollment'. Unable to execute Business Rule 'zzzAdjRevenueDriverValue'. Invalid script 'T#[CVYear]' near 'CVYear'.
Dim ExampleCVYearDataBuffer As DataBuffer = api.Data.GetDataBufferUsingFormula( "T#[|CVYear|]" )
Error processing Data Management Step 'Enrollment'. Unable to execute Business Rule 'zzzAdjRevenueDriverValue'. Invalid script 'T#[|CVYear|]' near '|CVYear|'.
At a minimum I'd like to know how to print the contents of the variable CVYear to the log.
api.LogMessage("Value of |CVYear| " & BRApi.Dashboards.Parameters.GetLiteralParameterValue(api.SI, True, "CVYear") )
api.LogMessage("Value of |CVYear| " & BRApi.Dashboards.Parameters.GetLiteralParameterValue(api.SI, True, "|CVYear|") )
Value of |CVYear| Unknown | 11/3/2022 12:24:56 PM | Information | Admin |
Appreciate any help on how to use these variables within Business Rules.
Thanks,
Chris