to get a personalized navigation.
to get a personalized navigation.
Hi,
We're currently using the following GraphQL query to extract general ledger balance data on one dimension:
{
useCompany(no: 1234567) {
generalLedgerBalanceForOrgUnit1(filter: { year: { _eq: 2023 } }) {
items {
accountNo
year
period
cbDomestic
orgUnit1
}
}
}
}
Is it also possible, through the API, to extract data on more than one dimension, such as both OrgUnit1 and OrgUnit2?
Solved! Go to Solution.
@Elling Bjåstad I suppose what you are looking for is general ledger transactions grouped by account and org units?
Yes, if orgUnit1 is department and orgUnit2 is project, we want the ability to query general ledger transactions grouped by year, period, account, department and project, so that we get individual numbers for each combination of department and project.
Edit: I looked briefly at the new groupBy feature, and it seems as if it covers what we need.
I'm not sure I understand the kind of query we are looking for. Our grouping works for data from one table. If we need to group together data from multiple tables, it won't work. So, I'd like to see a textual description or pseudo-query in order to better understand the need.
@Marius Bancila I think this is a need for the "groupBy"-feature to get the balance of different account/orgunit-combinations.
Do you mean like this?
query gl_balance_multiple_dimensions
{
useCompany(no: 1234567) {
generalLedgerBalanceForOrgUnit1(filter: { year: { _eq: 2023 } }) {
items {
accountNo
year
period
cbDomestic
orgUnit1
}
}
generalLedgerBalanceForOrgUnit2(filter: { year: { _eq: 2023 } })
{
items {
accountNo
year
period
cbDomestic
orgUnit2
}
}
}
}
Copyright © 2022 Visma.com. All rights reserved.