Forum Discussion
- DanielWillisValued Contributor
What is in your data adapter? It is most likely hard-coded to global time.
- jzacharNew Contributor
When you say "Data Adaptor" I think Data Source (correct me if I'm wrong). In my Data Source for TIME, the Setting 'Data Type' is set to 'DataKey Text'. The Connector Setting, 'Source Field Name' is set to 'Time'
- DanielWillisValued Contributor
You mentioned using GetAdoDataSetForAdaptor. This returns the dataset from a Data Adapter dashboard component. Neither the help nor knowledge-base mentions the function if you search so no points lost there.
The snippet editor shows:
You can see that one of the parameters is the combinedWsAndAdptrName. If you grab that out of your code and search for the adapter name in the workspaces/dashboards area (object type 'Components') you should be able to find the query/logic that is generating the dataset.
Ultimately you will have two options most likely. Make the existing logic more dynamic so you can pass in a time parameter, or duplicate the adapter to a new version which uses the WF time instead of global time. Former is probably the technically better option, latter is probably the easier.
- Nikpowar97Contributor
I agree with JackLacava here.
To enter the parameter in the Pull the data
BRApi.Dashboards.Process.GetAdoDataSetForAdapter(si, isSystemLevel, workspaceIDIfNotInName, combinedWsAndAdptrName, resultsTableName, customSubstVars)
in this function you use the parameters hereDim CustomSubvars as new Dictionary(of String,String) CustomSubvars.Add("Time",args.NameValuePairs.XFGetValue("Time") ' Time will be picked up form the data adapter using Method query Business rule {DashboardDataSetRuleName}{FunctioName}{Time = |!Time!|} Return BRApi.Dashboards.Process.GetAdoDataSetForAdapter(si, False, Nothing, "Default.YourDataadaptername","Test", customSubstVars)
- JackLacavaCommunity Manager
The problem is likely not that function, but rather the Data Adapter. Maybe the year is hardcoded in the Dashboard DataSet rule that it triggers, or maybe it expects some parameter you're not passing and hence it defaults to the current year.
Related Content
- 3 years ago