Page 1 of 1

Tm1 REST api - filter all subset except one dynamic subset

Posted: Tue Sep 11, 2018 8:30 am
by kavitha2002
Hello everyone,

Is it possible to filter all the subsets from dimension except one subet.

DIM
- subset1
- subset2
- excludesubset_username #It a dynamic subset, Username will be created dynamically.

Code: Select all

http://host:8001/api/v1/Dimensions('DIMName')/Hierarchies('DIMname')/Subsets?$filter=Name ne 'excludeSubset__User1'
above wil exclude subset when I give with full subset name.

but i want something like,

Code: Select all

http://host:8001/api/v1/Dimensions('DIMName')/Hierarchies('DIMname')/Subsets?$filter=Name ne 'excludeSubset__*'
because username will be appended dynamically.

Kindly post ur suggestion.

Re: Tm1 REST api - filter all subset except one dynamic subset

Posted: Tue Sep 11, 2018 10:40 am
by Wim Gielis
There is a filter with 'Starts with' option that you can use, to exclude the subsets that start with ...

Re: Tm1 REST api - filter all subset except one dynamic subset

Posted: Tue Sep 11, 2018 11:40 am
by kavitha2002
Thanks for your reply..

Ya I too agree startswith() works, but the scenario is I have to exclude one subset and retrieve all other subset in dimension uisng rest api.

My exceptation: Return all subsets except the one startswith("exclude_")

Re: Tm1 REST api - filter all subset except one dynamic subset

Posted: Tue Sep 11, 2018 10:34 pm
by macsir
you could put "not" in front of startswith function or use contains function instead. Looks like $search has not been implemented in TM1 rest api now.

Re: Tm1 REST api - filter all subset except one dynamic subset

Posted: Wed Sep 12, 2018 8:16 pm
by kavitha2002
It worked well. Thanks a lot. :)