ODK 2.0 Application Designer: Filtering large csv according to the first letter

Hi

I am busy working on a project with a large csv file that I would like to filter by asking for a prompt that asks for the first letter of the csv entry and then filter the csv on the next screen acording to that.

I tried these two filters in the choice_filter column so far but they have not worked:

choice_item.landing_site.startsWith(data('landing_site_first'))

choice_item.landing_site.substring(1) === (data('landing_site_first').substring(1))

I might be missing something fairly obvious, but have not found something to make this work in the documentation so far.

Thanks for your time.

Werner

See the "select one with search" prompt
https://opendatakit.org/help/form-design/examples/#select_prompts

This was added in the most recent ODK Collect release.

··· On Fri, Jul 8, 2016 at 1:38 AM, wrote:

Hi

I am busy working on a project with a large csv file that I would like to
filter by asking for a prompt that asks for the first letter of the csv
entry and then filter the csv on the next screen acording to that.

I tried these two filters in the choice_filter column so far but they have
not worked:

choice_item.landing_site.startsWith(data('landing_site_first'))

choice_item.landing_site.substring(1) ===
(data('landing_site_first').substring(1))

I might be missing something fairly obvious, but have not found something
to make this work in the documentation so far.

Thanks for your time.

Werner

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

To do this with the 2.0 tools, using the choice_filter is the right
approach. I've attached an example of how to do this. The choice_filter
that I use is below.

choice_item.key.substring(0,1) === data('first_letter')

Here I am filtering the rows in the CSV file based on the key column of the
birds.csv file starting with the same letter entered in for the
first_letter text prompt.

Clarice

selects.zip (1.42 MB)

··· On Fri, Jul 8, 2016 at 12:27 PM, Mitch Sundt wrote:

See the "select one with search" prompt
https://opendatakit.org/help/form-design/examples/#select_prompts

This was added in the most recent ODK Collect release.

On Fri, Jul 8, 2016 at 1:38 AM, wvdm1217@gmail.com wrote:

Hi

I am busy working on a project with a large csv file that I would like to
filter by asking for a prompt that asks for the first letter of the csv
entry and then filter the csv on the next screen acording to that.

I tried these two filters in the choice_filter column so far but they
have not worked:

choice_item.landing_site.startsWith(data('landing_site_first'))

choice_item.landing_site.substring(1) ===
(data('landing_site_first').substring(1))

I might be missing something fairly obvious, but have not found something
to make this work in the documentation so far.

Thanks for your time.

Werner

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.