Closed seadowg closed 1 month ago
@lognaturel is my mapping of pulldata
to a normal filter correct here?
The last name_key
should be name
but otherwise that's right. Good call on the [1]
, that's an important one.
Some review comments to address at https://github.com/getodk/collect/pull/6451#pullrequestreview-2375809634
Currently, using
pulldata
with an entity list will not work as expected as the data queried will be the entity list CSV rather than the local entities so data entities may not exist or may be out of date.pulldata
should work correctly in these cases and use the local entities.For the moment,
search
does not need to support local entities.Notes
pulldata
is implemented as a custom function (ExternalDataHandlerPull
). As we're most likely going to be removing the current implementation (and just treatpulldata
as sugar for optimised queries) we should create a new custom function that wraps the current implementation and just expandspulldata
to a "normal" filter expression if the filtered instance is an entity list. For example,pulldata('fruits', 'name', 'name_key', 'mango')
should just be treated asinstance('fruits')/root/item[name_key='mango'][1]/name
.