Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3354

Search on the expanded child entity field wont work.

$
0
0

Hi ,

 

I am trying to implement search on SmartFilterBar or Master-detail control. In both places in my list or in my table, I have $expand in my oData and trying to fetch data from child entities.

 

e.g. RecruitingAppplication -> RecruitingContactNav -> type


Also, applicationId is a property directly in RecruitingAppplication which I can search on without error.SAPUI5_Search.JPG

 

But I cannot search on Type (recruitingContactNav/type) or Requisition Name ( requisitionNav/requisitionName_defaultValue )


Please see below code sniffet.

---------------------------------------------------------------------------------------------------------

  var oSearch = new sap.m.SearchField({search:function(oEvent){

        var sQuery = oEvent.getParameter("query");

        var oBinding = mySmartTable.getTable().getBinding("items");

        if(sQuery){

          var oFilter1 = [new sap.ui.model.Filter("requisitionNav/requisitionName_defaultValue", "EQ", sQuery),

                          new sap.ui.model.Filter("recruitingContactNav/type", "EQ", sQuery),

                          new sap.ui.model.Filter("applicationId", "EQ", sQuery)

                         ];

          var allFilters = new sap.ui.model.Filter(oFilter1,false);

          oBinding.filter(allFilters);

        }

      }});

 

      mySmartFilterBar.setBasicSearch(oSearch);

 

----------------------------------------------------------------------------------------------------------------------------------------------

 

 

 

Is it even possible to search on child entity field ?

 

 

Please help ?


Viewing all articles
Browse latest Browse all 3354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>