Skip to Content
0

SetFilter() Multiple Value Not Working

Jan 03, 2017 at 06:36 AM

184

avatar image

Hi,

I am having 2 Tabs in Design Studio.

First Tab is having 8 Charts pointed to one Data Source DS_2.

Second tab is having 8 Charts pointed to second Data Source DS_3.

I have a Equipment Type List Box in both Tab.

I have created 2 more Data sources for Equipment Type

DS_ET_2 for first Tab Listbox.

DS_ET_3 for second tab Listbox.

What I am trying to achieve is Tab 1 - Equipment Type and 8 Charts should get restricted to only 4 Equipment Types and similarly Tab 2 - Equipment Type and 8 Charts should get restricted to only other 3 Equipment Types.

This is not working.

I have added the below code on Application Startup -

DS_ET_2.setFilter("0EQUIPMENT__0EQUITYPE",["JBS","JBD2","JBL","JBD1"]);

LISTBOX_ET_2.setItems(DS_ET_2.getMemberList("0EQUIPMENT__0EQUITYPE", MemberPresentation.EXTERNAL_KEY , MemberDisplay.TEXT, 1000));

DS_2.setFilter("0EQUIPMENT__0EQUITYPE", ["JBS","JBD1","JBD2","JBL"]);

DS_ET_3.setFilter("0EQUIPMENT__0EQUITYPE",["ATZ","TRZ"]);

LISTBOX_ET_3.setItems(DS_ET_3.getMemberList("0EQUIPMENT__0EQUITYPE", MemberPresentation.EXTERNAL_KEY , MemberDisplay.TEXT, 1000));

DS_3.setFilter("0EQUIPMENT__0EQUITYPE", ["ATZ","TRZ"]);

It always filters down to last item in the filter. In above case, JBL and TRZ.

Has somebody face this issue ? Please help me if i am going wrong somewhere.

Regards,

Chirag

10 |10000 characters needed characters left characters exceeded

Chirag - what is your data source? If it is a BEx query a best practice would be to restrict it at the query level first - the application will be faster that way

1

Hi Tammy,

Thanks. Yes it is BEx query. Your solution is correct but was thinking more off to applied on the Design Studio level.

Regards,

Chirag Desai

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

varun garaga Jan 03, 2017 at 11:27 AM
0

HI Chirag,

Instead of using set filter if you want charts should filter with 4 equipment types then go for set data selection API

chart .setdataselection() here you can do with multiple restrictions

or else as tammy suggested go ahead with BEX that would be helpful in performance perspective

Please let me know if you have any issues

Thanks,

varun

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks Varun will try that

0
Tammy Powlas
Jan 03, 2017 at 12:31 PM
0

Another idea is to hard-code your Listbox items - that should restrict it as well - see below:


1listbox.jpg (30.9 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks will try this option.

0