02-08-2023 04:25 PM - last edited on 05-02-2023 10:34 AM by JackLacava
I have a dashboard that has 2 components,.
1. A Combo Box that is populated with a sql query in a Bound List Parameter.
2. A Spreadsheet that is populated with a Table View. The table view is generated using a Spreadsheet Business Rule.
How do I pass the selection from the combo box to the table view?
Thank you for any suggestions.
Solved! Go to Solution.
02-09-2023 01:27 PM
Thank you for the response.
I wasn't ablet to get BRApi.Dashboards.Parameters.GetLiteralParameterValue to pickup the parameter from the Combo Box.
However I used args.CustSubstVarsAlreadyResolved("parameterNameHere") and assigned that to a string variable. That did work. It got the parameter value from the combo box.
02-09-2023 03:24 AM
You should be able to grab the value in your Tableview rule with BRApi.Dashboards.Parameters.GetLiteralParameterValue. You should place the two components in separate Dashboard frames though, so you can refresh the one with the spreadsheet when the combobox value changes - otherwise it won't pick it up.
02-09-2023 01:27 PM
Thank you for the response.
I wasn't ablet to get BRApi.Dashboards.Parameters.GetLiteralParameterValue to pickup the parameter from the Combo Box.
However I used args.CustSubstVarsAlreadyResolved("parameterNameHere") and assigned that to a string variable. That did work. It got the parameter value from the combo box.
02-22-2023 12:49 PM
Could you please provide the sample BR ? for the parameter from ComboBox ?
02-22-2023 01:23 PM
p_Select_Year is the Parameter.
There was a larger issue at play here, I first set this up on a 6.8x version and it wasn't working (The table view in a dashboard wasn't picking up the selection from the combo box) then I tried it on a 7x version and it worked.
Public Function Main(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As SpreadsheetArgs) As Object
Try
Select Case args.FunctionType
' Case Is = SpreadsheetFunctionType.Unknown
Case Is = SpreadsheetFunctionType.GetCustomSubstVarsInUse
If args.TableViewName.XFEqualsIgnoreCase("UserLogonActivity")
Dim paramList As New List(Of String)
paramList.Add("p_Select_Year")
Return paramList
End If
Case Is = SpreadsheetFunctionType.GetTableView
If args.TableViewName.XFEqualsIgnoreCase("UserLogonActivity")
Dim currentYear As String = args.CustSubstVarsAlreadyResolved("p_Select_Year")
Return GetUserLogonActivity(Si,currentYear)
End If
' Case Is = SpreadsheetFunctionType.SaveTableView
End Select
Return Nothing
Catch ex As Exception
Throw ErrorHandler.LogWrite(si, New XFException(si, ex))
End Try
End Function
02-22-2023 02:37 PM
Thanks for the Quick response. Appreciated. p_Select_Year is a parameter correct ?
02-22-2023 02:38 PM
Yes
02-22-2023 07:39 PM
Thanks