Skip to Content
0

How can I use Icon Tab bar filter and segmented button together?

May 03, 2017 at 01:43 PM

73

avatar image
Former Member

Hi everyone,
I am trying to use Icon Tab Bar Filter and Segmented Button together. For example, Icon Tab Bar Filter is filtering data on base of production country of the product, and segmented button is filtering data on base of price range of the product. If i want to see the products which are produced in A specific country and those products who are less then a specific price.

But both filters are not working together. If I select a country with Icon Tab Bar and then I select segmented button for price range. it is only filtering data on base of price range. And other way around.

Do anyone have idea, how to use multiple filters together?

Thanks in advance!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Mustafa Bensan May 04, 2017 at 05:15 AM
0

Hi Hasnain,

In order for the community to assist you, you should provide the following further information:

1. What version of Design Studio you are running;

2. Screenshots of your application to show the layout with Tab Bar Filter and Segmented Button;

3. The script code you are applying to filter the data source.

That being said, it sounds like you might have a cascading filter issue. I assume the "price range" you refer to for filtering purposes is defined as a Dimension and not a Measure. You should make sure that in the Initial View Editor of your data source that the Members for Filtering option for both dimensions is set to "Only Values with Posted Data".

Regards,

Mustafa.

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Mustafa,

Thanks for your reply, At this moment I am using SAP WEB IDE to develop a Fiori app.

Below image have one table, here important fields are Location ID and Currency. Icon Tab Bar filters are filtering data on Currency field. And segmented button is filtering data on Location ID field.

Suppose, I want all the products with Location ID 0000000020 and Currency Code USD. Therefor I choose USD in Icon Tab Bar and 00020 in Segmented button.

This code I used for Icon Tab Bar in Controller:

_nCurrencyFilter: {
	B05: [new Filter("CurrencyCode", "Contains", "EUR")],
	B45: [new Filter("CurrencyCode", "EQ", "USD")],
	B46: [new Filter("CurrencyCode", "EQ", "JPY")],
	B55: [new Filter("CurrencyCode", "EQ", "MXN")],
	B60: [new Filter("CurrencyCode", "EQ", "ARS")],
	B72: [new Filter("CurrencyCode", "EQ", "GBP")]
},

CurrencyFilter: function (oEvent) {
	var skey = 	oEvent.getParameter("key"),
	ofilter = this._nCurrencyFilter[skey],
	obinding = this._oTable.getBinding("items");
	obinding.filter(ofilter);
},

This code I Used for Segmented Buttons in controller:

_nLocationFilter: {
	Overdue: [new Filter("LocationID", "EQ", "0000000070")],
	CurrentWeek: [new Filter("LocationID", "EQ", "0000000020")]
},

LocationFilter: function (oEvent) {
	var skey = 	oEvent.getParameter("key"),
	ofilter = this._nLocationFilter[skey],
	obinding = this._oTable.getBinding("items");
	obinding.filter(ofilter);
},

If I select a Icon Tab Bar filter it is filtering the data on base of Icon Tab Bar filter and then if I choose a segmented button, it is updating the list on base of segmented button filter and remove Icon Tab bar filter.

I might need to use the array of filters to store both filters and implement together but it is not working at this moment.

I hope I am more clear now! If not, please let me know.

Thanks

0

Hi Hasnain,

Thanks for the clarification. Since you are developing a Fiori app with the Web IDE, this has nothing to do with SAP BusinessObjects Design Studio. I suggest you move your question to the SAP UI5 Community instead.

Regards,

Mustafa.

0
Former Member

Hi Mustafa,

Thanks for your time. I didn't notice but I will write it there.

0