I have a BO called Contact.
Contact can be Person or Company and if Contact is Company it can have:
ps_ParentCo (which is a Company)
pm_Subsidiaries (Companies)
pm_Employees (People - obvs)
I am trying to get a Tree to display the organisational hierarchy but I am completely flummoxed as to how to achieve this given that it is just one object but with pigs ear relationships back to itself.
Which attribute should the Tree be on?
Trees & Recursion
Re: Trees & Recursion
My answer assumes we are talking about lightweight trees...
Does Contact have a parent BO? You will need to set up the tree using the parent in order to see the 1st level in the hierarchy.
Then in the Contact BO Attributes tab, select your pigs ears and make sure that the Display Attributes property is set the way you want it. I know what you're thinking, "But Jon, that's only the default for a when a form/query is created." Not true. It's also how AIM determines what to use below the 1st level in the hierarchy.
Also, if you plan to use drag/drop and you use the parent BO to expose the 1st level, there is a gotcha you need to know about: https://www.awareim.com/forum/viewtopic ... ilit=+tree
And if you change the relationship between the parent/child BOs to peer as per above, you will need to add a deletion rule to maintain orphan protection: https://www.awareim.com/forum/viewtopic ... ilit=+tree
Hope that helped.
Does Contact have a parent BO? You will need to set up the tree using the parent in order to see the 1st level in the hierarchy.
Then in the Contact BO Attributes tab, select your pigs ears and make sure that the Display Attributes property is set the way you want it. I know what you're thinking, "But Jon, that's only the default for a when a form/query is created." Not true. It's also how AIM determines what to use below the 1st level in the hierarchy.
Also, if you plan to use drag/drop and you use the parent BO to expose the 1st level, there is a gotcha you need to know about: https://www.awareim.com/forum/viewtopic ... ilit=+tree
And if you change the relationship between the parent/child BOs to peer as per above, you will need to add a deletion rule to maintain orphan protection: https://www.awareim.com/forum/viewtopic ... ilit=+tree
Hope that helped.
v8.1 on Windows 10 / MySQL 5.6 (local), v8.1 on Windows Server 2016 / MySQL 5.6 (server)
-
- Posts: 1460
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Trees & Recursion
Ah, therein lies the problem, Contact is the top of the tree...
Re: Trees & Recursion
Maybe you could setup a fake parent just for that purpose?
v8.1 on Windows 10 / MySQL 5.6 (local), v8.1 on Windows Server 2016 / MySQL 5.6 (server)