Skip to Content

How to pass the selected value from one comboBox to another comboBox inside sap.m.Table?

Dec 08, 2017 at 06:49 AM


avatar image

Hi all,

I have an sap.m.Table and four ComboBoxes inside it. The ComboBoxes are placed in such a way that, the value selected from one combobox need to be passed as one of the 'filtervalue ' to the other combobox. I'm able to get the selected F4 value from the first combobox. But the issue that i'm facing is, i'm unable to pass that value to the other combobox. Can some one help me with this?list.png

list.png (19.9 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Simon Perstorfer Dec 08, 2017 at 10:55 AM

Hi Rama,

is your table based on a JSON Model?
If yes, every table row is bound to a entry in the model. You can save the selected key of the combobox to the entry in the model and access this saved key.

If not, you can create a event listener on changing combobox value and save the selected key to a seperate json model (f. e. create several entries in your json model representing each table row).


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

Hi Simon,

I'm not using JSON model. I'm trying to fetch data from Odata Model.

Akhilesh Upadhyay Dec 08, 2017 at 01:06 PM

you need to right something like below,

onChange: function(oEvent){
var selectedValue = //get selected value oEvent or model if model is twoway binding mode

var oFilter = new sap.ui.model.Filter("fieldname", "EQ", selectedValue);
secondCB.bindAggregation("items", {
  path: "/data path",
  filters: [oFilter],
  template: item_template

10 |10000 characters needed characters left characters exceeded