I have gpkg features table where I have $x and $y columns and features info. I also have a gpkg table with a grid generated by QGIS with UTM coordinates in (left, top, right, bottom) for each square. Each square has a unique id.
When collecting data on the field (QField) in my features table, when I add a new feature, is there a way for QGIS/QField to autodetect the grid square id containing that new feature?
So the solution of Nelson worked quite well but both table have to be in the same SRID to work. I wonder if there is a field calculator function to convert the coordinates of one table virtually before launching the spatial query function.