Skip to content

Add the pulldata function #242

@lognaturel

Description

@lognaturel

The pulldata function offers shortcut syntax for XPath queries that filter a list defined in a CSV based on a single property's value.

An initial implementation might construct and evaluate the corresponding XPath query. See Enketo's implementation.

One appealing thing about pulldata is because the query shape is known, it's easier to optimize. In Collect, this is done with a database backing. In Enketo, this is done by using the native browser evaluator. An initial implementation doesn't need to be optimized but ideally would have an eye towards future optimization ideas.

Typically we've ported JavaRosa scenario tests for XPath functions and other core functionality. However, JavaRosa does not implement pulldata, Collect does because of the database backing mentioned above. Here are some scenario tests verifying special cases that could be ported over.

Here is a user interested in using pulldata in the short term: https://forum.getodk.org/t/select-multiple-choices-then-rank-the-selected-choices/16444/16?u=ln

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions