If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

using children functions

Started by karthik12345, 15 Mar 2016 04:47:03 AM

Previous topic - Next topic

karthik12345

Hi all,

   I used below function to get the all the children of a particular member
   children ( [Camping Equipment] )
  o/p:cooking gear
         Tents
         Sleeping Bag
         Packs
         Lanthers
and my requirement is i have to use individual children by using  tail(children ([Camping Equipment]),1) i am getting 'Lanthers',
by using head(children ([Camping Equipment]),1) i am getting çooking gear.
if i use  head(children ([Camping Equipment]),2)  i am getting cooking gear and tents.
how to get tents, sleeping bags and packs(individually) dynamically.

Thanks,
Karthee
 
 

adam_mc

I don't know your exact use case, so assuming you want to get members in position 2-4 in a level, I would use some sort of mathematical set based function.

except(head(children ([Camping Equipment]),4), head(children ([Camping Equipment]),1)

The except function gets you what is in the first set, but not in the second set.

Hwoever, using the head/tail functions assumes the order of the members in the level are constant (and you know them) such that the same resulting set is always returned.
I don't know if this is the case for you.

Hope this helps.
Thanks,
Adam