Forum Discussion
As DanielWillis​ has mentioned, you cannot pass Nothing(null) as an argument for the Workspace Guid parameter in GetLiteralParameterValue. Instead pass in the workspace id of the workspace where your parameter lives.
At a minimum you need something like this:
Dim workspaceId As Guid = BRApi.Dashboards.Workspaces.GetWorkspaceIDFromName(si, False, "Your Workspace Name")
Dim myFlagValue As String = If(BRApi.Dashboards.Parameters.GetLiteralParameterValue(si, False, workspaceId , "myFlag"), "")
- JuleneDS22 days agoNew Contributor II
We set up all our dashboard under "Default" workspace. Using just your first line with "Default" and I'm still getting the same error. (I saw in another thread someone using Nothing or GUID.empty for the default which is why I tried that.)
- RobbSalzmann22 days agoValued Contributor II
Please post your code, could be something else causing the error.
The id of the default workspace is the same as Guid.Empty ('00000000-0000-0000-0000-000000000000') , so that would work.
You can use:
New Guid()
Guid.Empty
Nothingthey all do the same thing in vb. If you are still getting the null pointer error, then its something else in your code.
Its helpful to use null coalescence in cases where unexpected nulls may cause the null pointer error, "Object not set to a reference of an object", to happen - rhankey21 days agoContributor III
You need to specify the Guid of a real workspace, even if it is the Default Workspace.
Take a look at BRApi.Dashboards.Workspaces.GetWorkspace().
Related Content
- 3 years ago
- 2 years ago
- 2 years ago
- 12 months ago