Skip to Content
avatar image
Former Member

SetFilter() Multiple Value Not Working

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

Add comment
10|10000 characters needed 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

  • Former Member Tammy Powlas

    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

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jan 03, 2017 at 11:27 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 03, 2017 at 12:31 PM

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

    Add comment
    10|10000 characters needed characters exceeded