2 weeks ago
(this is in a clone/test app) I need to perform forecast for 2025. Our global POV (time) is set to 2024M3. In the adaptor used to pull in my volumes it uses the GetAdoDataSetForAdaptor to pull in the data, but even with my WF POV set to 2025, it still pulls 2024M4-2024M12. I'm guessing (obviously?) it uses the global year & not the WF POV to pull the data requested. Is there a way to override this, or some other way to load my volumes in an out year
2 weeks ago
What is in your data adapter? It is most likely hard-coded to global time.
a week ago
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'
Monday
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.
a week ago
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.
a week ago
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 here
Dim 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)