database query with filter on field in an object
Options
Geoffroy-CYD
Member ✭
Hi !
Let's imagine a user database. This database has a list field of objects called "states". Each object has a state (int) and date (timestamp) field.
This represents the user's status history.
Is it possible to make a query that will directly filter users with a specific status on the most recent date?
At the moment, I'm forced either to use a forEach loop, or to use a higher order filter, which isn't ideal in terms of performance.
I've tried to make a join, but without success.
Answers
-
I would make an additional field, "currentstate, " just the int. That way you can easily filter for it without having to be indirect.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback