0

I am trying to get records with status and between date range but getting error from firebase

 return collection.where('status', '==', IStatus.OPEN)
    .where('dateDue', '<', fromDate(dueDate))
    .where('createdAt', '>=', fromDate(startCreated))
    .where('createdAt', '<=', fromDate(endCreated))
    .orderBy('dateDue', 'asc');
});

enter image description here

  • 1
    The error message is quite explicit: Firestore can only have range/inequality conditions on a single field. See the docs on [query limitations](https://firebase.google.com/docs/firestore/query-data/queries#query_limitations) or one of the other [questions about this error message.](https://stackoverflow.com/search?q=%5Bgoogle-cloud-firestore%5D+cannot+have+inequality+filters+on+multiple+properties) – Frank van Puffelen Aug 19 '22 at 21:56
  • Only solution is to use multiple queries and merge all data into one – BIS Tech Oct 19 '22 at 08:37

0 Answers0