cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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!

Accepted Solutions (0)

Answers (1)

Answers (1)

MustafaBensan
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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

MustafaBensan
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Hi Mustafa,

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