Skip to Content

How to read json data with applying filter?

I have declared a select box like:

<Select items="{tpModel>/cl}" id="cbox" change="oncbchange" class= "space2">
	<items>
         core:ListItem key="{tpModel>project}" text="{tpModel>project}" />
	 </items>
</Select>

I want to show projects as per selected client. The full client list is stored in tpModel so in controller I have written the filter as

var aFilter=new sap.ui.model.Filter("client", sap.ui.model.FilterOperator.Contains, "clt"); 

and I am trying to store the filtered data as

var oData= tpModel.getData("/cl",{filters: aFilter});

Its not working. Here is how the data is there:

but in the project selectbox its showing nothing. Please help! Thanks!

jmodel.jpg (162.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers