What is the best way to avoid circular references in a hierarchy?
F
Fathia Jama
started a topic
over 2 years ago
What is the best way to avoid circular references in a hierarchy? For example, in the context of a chart of account, how is it possible to exclude all children of the currently edited account in the parent drop down list?
Luc Boissonneault, Zahuur's example would handle direct children. There's no way in SemQL to handle an arbitrary depth. But you could easily adapt this to preclude grandchildren, great grandchildren... etc up to any predetermined depth.
I was able to test out your example in my environment. I would recommend creating a picker filter in your stepper to achieve your desire result. Please follow these steps below
Navigate to the App Builder, Select your stepper then navigate to Steps > then select Reference Selection and create a Picker Filter similar to this one below to exclude the children's records.
Referenced.ID <> Record.ID AND ( Referenced.FID_ParentAccount <> Record.ID OR Referenced.FID_ParentAccount is null )
Thanks Zahuur. I am trying to exclude any record that is a child of the current record from the parent selector. Because it's a chart of account, we need to block cases like: A -> B -> C -> D -> A. For example, the list of avalaible parents in C should not include A or B.
Luc Boissonneault, Zahuur's example would handle direct children. There's no way in SemQL to handle an arbitrary depth. But you could easily adapt this to preclude grandchildren, great grandchildren... etc up to any predetermined depth.
Fathia Jama
What is the best way to avoid circular references in a hierarchy? For example, in the context of a chart of account, how is it possible to exclude all children of the currently edited account in the parent drop down list?
Matthew Dahlman
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstFathia Jama
Hi Luc,
I was able to test out your example in my environment. I would recommend creating a picker filter in your stepper to achieve your desire result. Please follow these steps below
Navigate to the App Builder, Select your stepper then navigate to Steps > then select Reference Selection and create a Picker Filter similar to this one below to exclude the children's records.
Fathia Jama
Luc Boissonneault
A -> B -> C -> D -> A.
For example, the list of avalaible parents in C should not include A or B.
Fathia Jama
Matthew Dahlman
-
Extend a model with new entities or attributes
-
Data types in xDM
-
Effective date on entities
-
Search using wild cards
-
Export a model from production and import on a development environment
-
"Allow Delete" vs "Allow Removal" privileges
-
LOV label in Named Query
-
Select location on a map and save coordinates
-
Is there a way to set up a master-detail relationship on browse mode?
-
Choose Either a Stepper or A Workflow Based on The User Privileges
See all 274 topics