Bella_Yu
5 months agoNew Contributor II
Call Data Adapter with GetAdoDataSetForAdapter and Pass Parameter Value
The goal is to get underlying dashboard data, I'm developing business rule using VB to call respective data adapter. The issue is, the data adapter has 1 parameter, not sure if it's possible to pass parameter value to it in BR.
Below is my BR code and sample sql scripts for the data adapter,
Dim isSystemLevel As Boolean = False
Dim workspaceID As Guid = BRApi.Dashboards.Workspaces.GetWorkspaceIDFromName(si, isSystemLevel, "Default")
Dim adapterName As String = "da01_entity_hierarchy_filtered"
Dim rsTableName As String = "OutputTable"
Dim dctVars As New Dictionary(Of String, String)
Using ds As DataSet = brapi.Dashboards.Process.GetAdoDataSetForAdapter(si, isSystemLevel, workspaceID, adapterName, rsTableName, dctVars)
If ds.Tables.Count > 0 Then 'If there are >0 tables in the results
Using dt As DataTable = ds.Tables(0).Copy()
op_table = dt.Copy() ' Clone the DataTable
End Using
End If
End Using
SELECT C.NAME
FROM Member C
WHERE C.Name = '|!Select_Entity_EP!|'