Forum Discussion

RobbSalzmann's avatar
RobbSalzmann
Valued Contributor II
2 years ago

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 Marketp...
  • amoore's avatar
    2 years ago

    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:

    New:


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

    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! 

  • ChrisLoran's avatar
    2 years ago

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

  • ChrisLoran's avatar
    ChrisLoran
    2 years ago

    My apologies for some confusion, I was testing on a beta-release prior to the documentation (thanks AMoore the clarifying).
    I have installed the v7.4 general release and confirm this is how to access a Literal Parameter Value from a named workspace other than default:

     

    Dim strParamValue As String = BRApi.Dashboards.Parameters.GetLiteralParameterValue(si,False,Nothing,"ChrisWS.TXP_UD1_TJ")
    brapi.ErrorLog.LogMessage(si, strParamvalue)

     

    Output:

    Note: If you are accessing a Literal Parameter defined in a different workspace then that workspace will have to be defined as [Is Shareable Workspace] = True. Default is False. If False then the GetLiteralParameterValue returns the string "Unknown".