EISCHILD for multiple levels

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • EISCHILD for multiple levels

    Hi all,

    i have a problem with EISCHILD function.

    I need to check if a given element is part of a group.

    EISCHILD checks only one level back but the parent can be two or three levels up.

    - Northern Germany
    -- Bremen
    -- Hamburg

    EISCHILD is true for Is Bremen part of Northern Germany (lvl 1)
    EISCHILD is false for Is Bremen part of Germany (lvl 2)

    Is there any other posibility to get the result needed?

    Thanks in advance
  • Hi Christian,

    there is no standard function to do what you wanna do.

    But with a combination of functions you can achieve this quite easily:

    - you prepare a PALO.ELEMENT_LIST_DESCENDANTS (in this case your top Element is either Northern Germany or Germany) to check whether this is what you need

    Source Code

    1. =PALO.ELEMENT_LIST_DESCENDANTS("yourconnection/yourdatabase";"yourdimension";"Germany")

    - with the VERGLEICH (In english : MATCH) you can search for a value in an array function.

    Source Code

    1. =MATCH("Bremen";PALO.ELEMENT_LIST_DESCENDANTS("yourconnection/yourdatabase";"yourdimension";"Germany");0)

    Last parameter is the comparison operator
    This will give 1 if the value is found, else error

    Hope this helps !

    Post hoc, non est propter hoc