Forum Discussion

NicoD's avatar
NicoD
Ideator I
7 months ago

View all generation on query definition child parent

Hello, how can I display all generations of my Part by applying a filter in my query definition? I'm in the case of a child-parent relationship.
I read the builder guide but the examples are mostly in the parent-child direction.I work on Aras 22.Thank you.

7 Replies

  • Hi Nico,

    You should be able to apply a condition on the top-level part like `generation > 0` in order to get all generations the Parts.

    Depending on your exact use case, this may come with a caveat. I think what you're trying to do is see the full BOM structure for each generation of the top-level Part. In order to do that, you couldn't re-use the top-level element to do your recursive query or else you'd end up with a messy BOM structure containing every version of the child Parts as well. However, this is easily resolved by keeping the top-level part separate and using recursion on the Part BOM relationship like the example below:

    Hope this helps!

    • NicoD's avatar
      NicoD
      Ideator I
      Hello, thank you for your reply, my use is in the search for use cases of components from the lowest level to the highest (child to parent). Your method is in the parent to child direction, can I adapt your method to mine thank you again.
      • You should be able to adapt this. The important bit is the `generation > 0` condition that you'll need to see all versions of the part which should work even if you flip this to a child -> parent relationship.