Filter data by two fields, is it possible?

System Information
  • Strapi Version:
  • Operating System: Win 10
  • Database: SqlLite
  • Node Version:
  • NPM Version:
  • Yarn Version:

Is it possible to filter data by using two fields in a content type. I have a field called QTY and another called QtyLowThreshold. I’d like to filter all the items that have a QTY lower than the QtyLowerThreshold. I tried the following but it didn’t work.

Items?Qty_lte=QtyLowerThreshold

Not like that currently, you would need to know the value to pass into the Qty_lte

The lte/lt and gte/gt filters require a number and there is no logic by default that can pull that value from somewhere else inside of Strapi.

Bummer, so i guess I’ll have to pull back the entire list and loop over it :frowning:

Or create a custom controller to handle a case like that.