Hi,
I have a business object (Ac.Chart) and in the attributes there is a "Parent" , the type is "Account" witch is the name of the account itself (Assets, Liabilities, Income ....etc).
OK for example: I created -Assets- without parent, and I created -Fixed assets- with parent -Assets-
Until here there is no problem,
I created two queries, the parent is (Chart) and the child is (ChartDetails) and from expansions of rows I selected the query (ChartDetails).
In the child query (ChartDetails) and in the textual view of matching criteria I tried every rule that i know to make the parent only shows its children.
I hope that someone could help me with the right rule to solve this problem.
Regards
Mohd
Chart of Accounts (SOLVED)
-
- Posts: 58
- Joined: Thu Sep 13, 2012 7:06 pm
Chart of Accounts (SOLVED)
Last edited by mohd.documents on Wed Jan 29, 2020 7:28 am, edited 1 time in total.
-
- Posts: 1458
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Chart of Accounts ..
You don't need any rules.
Create a query called ChartHierarchy
Then on query listing the highest levels allow row expansion and display the query ChartHierarchy
Create a query called ChartHierarchy
Code: Select all
Find ChartDetails where ChartDetails.Parent =Chart
-
- Posts: 58
- Joined: Thu Sep 13, 2012 7:06 pm
Re: Chart of Accounts ..
@PointsWell
I have only one BO so I can not call (ChartDetails) from the code you provided, also I am a lit bit confused where to use the code in the parent query or child query?
Notes: I use the same BO for parent and child, the relationship type is the same BO
Appreciate your help.
I have only one BO so I can not call (ChartDetails) from the code you provided, also I am a lit bit confused where to use the code in the parent query or child query?
Notes: I use the same BO for parent and child, the relationship type is the same BO
Appreciate your help.
-
- Posts: 58
- Joined: Thu Sep 13, 2012 7:06 pm
Re: Chart of Accounts ..
If any one made chart of account as tree, please guide us to the best way to accomplish this.
Thanks
Thanks
-
- Posts: 1458
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Chart of Accounts ..
You need two queries.
HeaderQuery
Set row expansion on this query to display a query select ChildQuery
ChildQuery
That's it.
HeaderQuery
Code: Select all
FIND Ac WHERE Ac.Parent IS UNDEFINED
ChildQuery
Code: Select all
Find Ac where Ac.Parent =ThisAc
Re: Chart of Accounts ..
I am not sure I would have a parent for the chart of accounts. Instead, how about 2 BOs. One called chartOfAccounts and it would have an attribute called "type" which is a peer relationship to the "accountType table. This gives you a lot of options. Can filter just on one AccountType, can sort and print by account type.
Using Aware, I tend to think of Parent Child where the child can NOT exist without the parent. I.e. Purchase Lines with Purchase headers. or Payroll transactions to employees.
I think of Peer relationship to catagorize or filter or sort. Also, with a chart of accounts, you will want more info in account type. I.e. is balance sheet or income & expense account.
You made it extra tough by trying to make the account a parent of account. There is no good reason to have only 1 BO. You can not post to "Assets", just accounts under assets.
Bruce
Using Aware, I tend to think of Parent Child where the child can NOT exist without the parent. I.e. Purchase Lines with Purchase headers. or Payroll transactions to employees.
I think of Peer relationship to catagorize or filter or sort. Also, with a chart of accounts, you will want more info in account type. I.e. is balance sheet or income & expense account.
You made it extra tough by trying to make the account a parent of account. There is no good reason to have only 1 BO. You can not post to "Assets", just accounts under assets.
Bruce
-
- Posts: 1458
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Chart of Accounts ..
Respectfully I disagree Bruce. Charts of account are purely hierarchical structures with 4 rootsBLOMASKY wrote:I am not sure I would have a parent for the chart of accounts. Instead, how about 2 BOs. One called chartOfAccounts and it would have an attribute called "type" which is a peer relationship to the "accountType table. This gives you a lot of options. Can filter just on one AccountType, can sort and print by account type.
Using Aware, I tend to think of Parent Child where the child can NOT exist without the parent. I.e. Purchase Lines with Purchase headers. or Payroll transactions to employees.
I think of Peer relationship to catagorize or filter or sort. Also, with a chart of accounts, you will want more info in account type. I.e. is balance sheet or income & expense account.
You made it extra tough by trying to make the account a parent of account. There is no good reason to have only 1 BO. You can not post to "Assets", just accounts under assets.
Bruce
Asset
Liability
Revenue
Cost
Every account has to be related to this eg
Assets
-Real Estate
-Equipment and Machinery
Real Estate has child records potentially
Asset
- Real Estate
- - Office One
- - Office Two
Office One cannot exist distinct of Real Estate and Real Estate cannot exist distinct from Assets. Top level Accounts cannot have transactions associated with them but that is easy to filter out FIND Account WHERE Account.Parent IS DEFINED
What the OP will find is that he will need to update records in the hierarchy to obtain balances.
Last edited by PointsWell on Wed Jan 29, 2020 6:34 am, edited 1 time in total.
-
- Posts: 58
- Joined: Thu Sep 13, 2012 7:06 pm
Re: Chart of Accounts ..
Dear PointsWell,
That solved the problem
Thank you so much for your help.
That solved the problem
Thank you so much for your help.