SubsetElementGetIndex TI function

Post Reply
User avatar
gtonkin
MVP
Posts: 1192
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

SubsetElementGetIndex TI function

Post by gtonkin »

Saw this documentation update tonight and thought it may be useful to some - needs 10.2.2 FP6 however.

I guess it is not really returning the index of the element in the subset that is useful - for me right now being able to test if an element is part of the subset is probably more useful i.e. having a zero returned indicating element is not within the subset.
User avatar
qml
MVP
Posts: 1094
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1 / Planning Analytics
Version: 2.0.9 and all previous
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: SubsetElementGetIndex TI function

Post by qml »

Wow. SUBIX. Finally.
Kamil Arendt
lotsaram
MVP
Posts: 3651
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: SubsetElementGetIndex TI function

Post by lotsaram »

qml wrote:Wow. SUBIX. Finally.
There's also going to be a CubeGetDimensionCount. Although it's clearly been a missing function there are more important things I would have focused on given the chance.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Wim Gielis
MVP
Posts: 3103
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: SubsetElementGetIndex TI function

Post by Wim Gielis »

gtonkin wrote:I guess it is not really returning the index of the element in the subset that is useful
If the function SubsetElementDelete only takes an index instead of an element name, I would be interested in the index number in the subset.
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Duncan P
MVP
Posts: 600
Joined: Wed Aug 17, 2011 1:19 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2003 2007
Location: York, UK

Re: SubsetElementGetIndex TI function

Post by Duncan P »

The key thing is that by specifying a start index they have given a way of iterating over all the occurrences of an element in a subset.
lotsaram
MVP
Posts: 3651
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: SubsetElementGetIndex TI function

Post by lotsaram »

Wim Gielis wrote: Tue Aug 30, 2016 12:15 pm
gtonkin wrote:I guess it is not really returning the index of the element in the subset that is useful
If the function SubsetElementDelete only takes an index instead of an element name, I would be interested in the index number in the subset.
There is a ER for SubsetElementDeleteByName if you want to vote for it.
http://www.ibm.com/developerworks/rfe/e ... _ID=108338
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
User avatar
Alan Kirk
Site Admin
Posts: 6606
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: SubsetElementGetIndex TI function

Post by Alan Kirk »

lotsaram wrote: Thu Jul 27, 2017 8:52 am
Wim Gielis wrote: Tue Aug 30, 2016 12:15 pm
gtonkin wrote:I guess it is not really returning the index of the element in the subset that is useful
If the function SubsetElementDelete only takes an index instead of an element name, I would be interested in the index number in the subset.
There is a ER for SubsetElementDeleteByName if you want to vote for it.
http://www.ibm.com/developerworks/rfe/e ... _ID=108338
Upvote from me; you seem to have considered all of the angles including when it should and shouldn't fail. (Let's not get started on TI still not having Try / Catch or any other real error handling, but that aside...)
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Wim Gielis
MVP
Posts: 3103
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: SubsetElementGetIndex TI function

Post by Wim Gielis »

I voted too !
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
lotsaram
MVP
Posts: 3651
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: SubsetElementGetIndex TI function

Post by lotsaram »

There's also an ER for SubsetAliasGet while you're at it!
http://www.ibm.com/developerworks/rfe/e ... _ID=109262
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Wim Gielis
MVP
Posts: 3103
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: SubsetElementGetIndex TI function

Post by Wim Gielis »

You got my vote, I have been in the same boat of reading out *.SUB files, which is an unnecessary overhead.
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Post Reply