Split my filter into 2 filters one which is delegable and one which is not none-delegable

Iron Contributor

Inside the screen onvisible, i have this filter statement to build a collection:-

 

 

ClearCollect(colSpareParts,ShowColumns(Filter('Spare Parts Asset Types','Asset Type ID'=varWorkOrderATID && ActiveStatus.Value="Active"),"SparePartID"));

 

Then inside a Combobox items property, i have this statement:-

 

With(
   {
      _Start: 
      Filter(
         'Spare Parts', ActiveStatus.Value="Active" And Quantity > 0 And
         StartsWith(
            Title,
            Self.SearchText
         ) And ID in (colSpareParts)
      )
   },
   Sort(
      
        _Start,
         Title
     
   )
)

 

 now part of the statement is delegable and part of it is not , as follow:-

 

 

image.png

 

so how i can do the delegable query first, then run the none-delegable part (in operator) on the delegable results?

 

Thanks

 

0 Replies