01-05-2023
05:26 AM
- last edited
4 weeks ago
by
JackLacava
Dear Community,
There is a possiblity to retrieve parameters currently available in a dashboard using for instance :
Dim str_myParam As String = args.SelectionChangedTaskInfo.CustomSubstVars.XFGetValue("MyParameter")
However, this means that we need to know the names of the CustomSubstVars currently in the dashboard (in that case, I need to know that the parameter MyParameter is indeed available in the dashboard).
In my use case the user can open several cube view hence the parameters will change from one Cube View to another. Is there a way to list all current CustomSubstVars available in the dashboard ?
Regards,
Solved! Go to Solution.
01-05-2023 08:12 AM
CustomSubstVars is a VB.Net Dictionary, so you can play around with its keys.
For Each key As String In args.SelectionChangedTaskInfo.CustomSubstVarsWithUserSelectedValues.Keys
brapi.ErrorLog.LogMessage(si, $"{key} is present")
Next
Dim isPresent as Boolean =
args.SelectionChangedTaskInfo.CustomSubstVarsWithUserSelectedValues.Contains("myKey")
' ... etc etc
01-05-2023 08:12 AM
CustomSubstVars is a VB.Net Dictionary, so you can play around with its keys.
For Each key As String In args.SelectionChangedTaskInfo.CustomSubstVarsWithUserSelectedValues.Keys
brapi.ErrorLog.LogMessage(si, $"{key} is present")
Next
Dim isPresent as Boolean =
args.SelectionChangedTaskInfo.CustomSubstVarsWithUserSelectedValues.Contains("myKey")
' ... etc etc