Skip to Content
0

How to read json data with applying filter?

Nov 21, 2017 at 07:04 AM

26

avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers