Skip to main content
RobbSalzmann
Employee - Advisor
Employee - Advisor
Mar 21, 2023 9:17 PM UTC
Solved

Deprecated GetLiteralParameterValue and SetLiteralParameterValue replacements?

I'm getting the message "'Function GetLiteralParameterValue(si As SessionInfo, isSystemLevel As Boolean, parameterName As String) As String' is obsolete: 'This is a temporary function used by Marketplace Solutions for backwards compatibility with old XF versions. Please change your code to use supported functionality.'."

 

Anyone know what object & method should I be using instead?

 

 

strSomeString = BRApi.Dashboards.Parameters.GetLiteralParameterValue(si,Nothing,"pm_SomeParameter")

 

 

 

amooreAnswer
OneStream Employee
Mar 21, 2023 10:30 PM UTC

Hi Robb, 

Here's guidance for 7.3.1. In 7.4, more functions are coming for workspaces as the workspace features evolve. 

If you hover over the intellisense after Parameters. you will see a down arrow showing a second function which is the new implementation of the function. This function incorporates the Workspace ID as a GUID. 
Old:

amoore_0-1679437295512.png

New:

amoore_1-1679437499112.png


If the dashboard is located under the default workspace, use Guid.Empty as shown below. 

amoore_2-1679437636747.png

If the dashboard object is located under a Named Workspace, you want to pass through the Workspace ID for that Workspace so at runtime it can locate the literal value parameter since that same parameter name can now be used in another workspace. 

Hope this helps! 

19 replies

amooreOneStream EmployeeAnswer
OneStream Employee
Mar 21, 2023 10:30 PM UTC

Hi Robb, 

Here's guidance for 7.3.1. In 7.4, more functions are coming for workspaces as the workspace features evolve. 

If you hover over the intellisense after Parameters. you will see a down arrow showing a second function which is the new implementation of the function. This function incorporates the Workspace ID as a GUID. 
Old:

amoore_0-1679437295512.png

New:

amoore_1-1679437499112.png


If the dashboard is located under the default workspace, use Guid.Empty as shown below. 

amoore_2-1679437636747.png

If the dashboard object is located under a Named Workspace, you want to pass through the Workspace ID for that Workspace so at runtime it can locate the literal value parameter since that same parameter name can now be used in another workspace. 

Hope this helps! 

Member
Mar 23, 2023 4:47 PM UTC

[Off Topic]
amoore Do I see an IDE? Any guide on how to set it up?

OneStream Employee
Mar 28, 2023 3:54 PM UTC

I'd like details on this too please

OneStream Employee
Mar 22, 2023 9:00 AM UTC

(Edit: I removed my earlier response as it is now obsolete)

RobbSalzmann
Employee - Advisor
Employee - Advisor
Mar 22, 2023 1:33 PM UTC

ChrisLoran If the parameter were in your "MySolution01" workspace, would the parameter argument be:
"MySolution01.prm_pMinEquityMethod_ECT"?

Do you know how to get the guid for a workspace?

OneStream Employee
Mar 22, 2023 2:40 PM UTC

(I removed my earlier response here as it is now obsolete)

RobbSalzmann
Employee - Advisor
Employee - Advisor
Mar 22, 2023 12:38 PM UTC

amoore ChrisLoran Thank you both for explaining both how and why.  This is very helpful.

OneStream Employee
Mar 22, 2023 9:17 PM UTC

RobbSalzmann  - to expand of Chris response related to 7.4. There are a number of BRApi functions coming surrounding workspaces that will assist with this functionality like "GetWorkspaceIDFromName". An example of this in 7.4 would be: 

Dim wsIdValue As Guid = BRApi.Dashboards.Workspaces.GetWorkspaceIDFromName(si, isSystemLevel, workspaceName)

In 7.3, although there is no BRApi function to obtain the workspace ID when using a named workspace, you can pass through args as DashboardExtenderArgs in your function signature and then specify args.PrimaryDashboard.WorkspaceID. As a note though, this implementation may run into problems if you need to lookup objects across multiple workspaces dynamically based using Workspace Name to obtain the ID. This where the functions in 7.4 that are coming will be more programmatically efficient for your needs. 

 

OneStream Employee
Mar 28, 2023 4:22 PM UTC

RE:  Warning at line 52:  'Sub SetLiteralParameterValue(si As
SessionInfo, isSystemLevel As Boolean, parameterName As String, newValue As
String)' is obsolete: This is a temporary function used by Marketplace
Solutions for backwards compatibility with old XF versions. Please change your
code to use supported functionality.

So what's the new functionality?  Same subroutine name just different parameters.  Old one still works but it is deprecated.

Snag_29e66b03.png

Thanks for posting this.  I ran into the same warning message today and I was wondering exactly how "to change the code to use the supported functionality."

 

 

 

Contributor
Mar 28, 2023 10:46 PM UTC

Maybe these warnings need to provide a bit more direction.

Contributor
Aug 2, 2023 4:07 PM UTC

Thank you, and hat tip to Omkareshwar for guiding some of us here, this thread is a huge time saver and full of really good contributions on resolving this error.