Page 1 of 1

Parent Element in Subset

Posted: Tue Oct 24, 2017 4:12 pm
by RSK
Is there away of returning an element parent from a subset source within a TI?

The dimension I am using has multiple hierarchies contained within in it, therefore the standard Elpar function returns the parent for the 1st hierarchy it comes across.

Thanks

Re: Parent Element in Subset

Posted: Tue Oct 24, 2017 4:36 pm
by qml
Subsets do not store any relationships between elements, so unless your subset is designed to encode relationships in the element order itself (e.g. the parent you're after is always directly before the child or something similar) then you're out of luck.

Of course, ELPAR can be used to get any parent, not just the first one. You could cycle through all parents, using ELPARN to give you their total number, and using some other information (attribute, naming convention etc.) to pick the right parent.

Re: Parent Element in Subset

Posted: Tue Oct 24, 2017 4:38 pm
by Wim Gielis
Can you populate an attribute and read the value ?

Re: Parent Element in Subset

Posted: Tue Oct 24, 2017 5:39 pm
by RSK
Thanks both, I suspected as much. I'd been heading down the attribute route since I posted this.