Skip to content

Support delimited fields #48

@gmaclennan

Description

@gmaclennan

ODK Collect returns data from multi-select fields as space-delimited fields, e.g.

{impacts: 'deforestation contamination loss_of_biodiversity'}

This is a little tricky to use heuristics to recognize, so short-term we will probably need to manually define which fields are space-delimited.

They are also tricky to filter. We are restricted in this new version by Mapbox's filter language which only does exact matches on fields - for performance reasons I assume.

I think the solution is to flatten these fields into multiple fields e.g.:

{
  'impacts.0': 'deforestation',
  'impacts.1': 'contamination',
  'impacts.2': 'loss_of_biodiversity'
}

Then set the same filter on each of those fields. With datasets when many options are selected in a multi-select this might be a performance issue, but we will have to see. In many datasets there will only be max 3-4 options selected - in our field analysis we can track the max number so we only need ot set that number of filters.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions