07-27-2022 12:31 PM - last edited on 05-02-2023 10:36 AM by JackLacava
Hi OneStreamers,
I am trying to build an XFBR which I will link to a CV Column, that will either "True" or "False" Depending on the value of a parameter.
However I am finding trouble returning the value. I came up with this but it seems tor eturn the Default Value of the parameter and not the Selected Value :
"If args.FunctionName.XFEqualsIgnoreCase("CheckScnForVisibleColumn") Then
Dim ScnParamName As String = "3_cm_param_S_SelectFC"
Dim ScnParamValue As String = ""
ScnParamValue = BRApi.Dashboards.Parameters.GetLiteralParameterValue(si, False, ScnParamName)
brapi.ErrorLog.LogMessage(si,ScnParamValue)"
Appreciate your help 🙂
Regards,
Adam
Solved! Go to Solution.
07-27-2022 03:57 PM
Hi kakouchtim: try passing in the parameter to the BR rather than using the BRApi functions.
For example:
If args.FunctionName.XFEqualsIgnoreCase("CheckScnForVisibleColumn") Then
Dim ScnParamName As String = args.NameValuePairs.XFGetValue("MyParam")
....business logic that checks ScnParamName against a predicate and returns True / False
Usage would be:
XFBR(Your_BR_Name, CheckScnForVisibleColumn, MyParam=[|!3_cm_param_S_SelectFC!|])
This assumes usage in an XFBR String Business Rule, but that sounds like what you are after. Hope this helps!
-db
07-27-2022 03:57 PM
Hi kakouchtim: try passing in the parameter to the BR rather than using the BRApi functions.
For example:
If args.FunctionName.XFEqualsIgnoreCase("CheckScnForVisibleColumn") Then
Dim ScnParamName As String = args.NameValuePairs.XFGetValue("MyParam")
....business logic that checks ScnParamName against a predicate and returns True / False
Usage would be:
XFBR(Your_BR_Name, CheckScnForVisibleColumn, MyParam=[|!3_cm_param_S_SelectFC!|])
This assumes usage in an XFBR String Business Rule, but that sounds like what you are after. Hope this helps!
-db
07-28-2022 03:39 AM
Hi,
Thank you so much @db_pdx ! It worked !
Spot on I was indeed using it in an XFBR String Business Rule.
Have a nice day.
Adam