List all CustomSubstVars from current dashboard ?

Sergey
Contributor III

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,

1 ACCEPTED SOLUTION

JackLacava
Honored Contributor

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

 

View solution in original post

1 REPLY 1

JackLacava
Honored Contributor

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