Literal parameters and multiple users
- 2 years ago
Literal Parameters values are application-wide, session inspecfic. Things like formats and colors work well in Literal parameters
For user/session specific parameters, use Input Parameters:
In your code, these Input Parameters are oddly named "ModifiedSubVars". You change the value of the ModifiedSubVars on the returned Task Result object, e.g. XFLoadDashboardTaskResult, XFSelectionChangedTaskResult depending on what event you're handling. Be sure to also set one or all of the ChangeCustomSubstVarsIn properties to True.
E.g.selectionChangedTaskResult.ChangeCustomSubstVarsInDashboard = True
selectionChangedTaskResult.ModifiedCustomSubstVars.Add("pm_myParameter_Name", "User Specific Value") - 2 years ago
It finally works! The problem was that the popup came out every time the dashboard refreshed, thus every time this section of the script was triggered:
Case Is = DashboardExtenderFunctionType.LoadDashboard
If args.FunctionName.XFEqualsIgnoreCase("LoadFunction") Then
.....
End IfI managed to avoid the pop up to come out by adding a couple of lines of code:
Case Is = DashboardExtenderFunctionType.LoadDashboard
If args.FunctionName.XFEqualsIgnoreCase("LoadFunction") Then
loadDashboardTaskResult.ChangeCustomSubstVarsInDashboard = True
If Not(args.LoadDashboardTaskInfo.CustomSubstVarsFromPriorRun.XFGetValue("p_RowEntityList").Equals("None")) Then
loadDashboardTaskResult.ModifiedCustomSubstVars.Add("p_RowEntityList", args.LoadDashboardTaskInfo.CustomSubstVarsFromPriorRun.XFGetValue("p_RowEntityList"))
loadDashboardTaskResult.ModifiedCustomSubstVars.Add("p_RowAccList", args.LoadDashboardTaskInfo.CustomSubstVarsFromPriorRun.XFGetValue("p_RowAccList"))
loadDashboardTaskResult.ModifiedCustomSubstVars.Add("p_RowDocList", args.LoadDashboardTaskInfo.CustomSubstVarsFromPriorRun.XFGetValue("p_RowDocList"))
Return loadDashboardTaskResult
Else
loadDashboardTaskResult.ModifiedCustomSubstVars.Add("p_RowEntityList", "None")
loadDashboardTaskResult.ModifiedCustomSubstVars.Add("p_RowAccList", "None")
loadDashboardTaskResult.ModifiedCustomSubstVars.Add("p_RowDocList", "None")
Return loadDashboardTaskResult
End If
End IfThe rest of the script is structured as Rob suggested.
Thank you all for the help!