05-24-2023 07:18 PM
I am building a data adaptor for journal entry information using
command type: Method
method type:journalforworkflowunit
query:{Cons}{Actual}{2022M9}{All}{JournalStatus='Posted' and UD7name='CONS_ADJ'}
i would like to be able to pull multiple months of journal but it seems that the query only accepts single month values as the third filter. it there a way to pull all months prior to and including my filter) like 2022M9.allpriorinyear
05-26-2023 05:09 AM
Hi,
Can you tweak your query to have period filter as ... time <= 2022M9, it will include all months prior to the passed filter.
Hope this helps.
05-26-2023 05:56 AM - edited 05-26-2023 05:56 AM
The name of the call is JournalForWorkflowUnit. The Workflow Unit is basically like the more-commonly-known "Level 1" Data Unit, i.e. the set of data identified by the combination of one member for each of the 6 main dimensions (i.e. 1 cube, 1 scenario, 1 entity, 1 parent, 1 time period, 1 consolidation member), with some further restrictions. That means you are restricted to one time member.
A possible workaround I can see is to set up the adapter to require a Parameter for the month, then execute the adapter multiple times in a Dashboard DataSet using BRApi.Dashboards.Process.GetAdoDataSetForAdapter, passing a different month each time. You can then unite the resulting DataTable objects with their .Merge method, and return the resulting object.
Another workaround is to dump everything to file, using BRApi.Journals.Data.ExportJournalsToCsv (which accepts a time filter), and then read the file back into a DataTable.