Customized odk collect to lookup value before form field

hi guys i realy need to lookup a value before a form is field to avoid
duplicates .

anyone who has done that already.

or maybe generate a list when every form is created to allow to lookup a
value on that list. the list ma contain an ID of a person.

Hi Coulson,

You could write a separate little app that maintains a database of "already
taken" ID values, and only allows entry of non-duplicates. You could then
call that app with an external intent. See, e.g., this entry from the
Collect release notes:

add support for launching an external app to obtain a string, integer or
decimal value. Support is via "ex:intentpath" appearance attribute on
string, integer or decimal input widgets. An example external app is
BreathCounter here
http://code.google.com/p/opendatakit/source/browse?repo=androidextras

If you need to coordinate the avoidance of duplicates across devices, then
that becomes more involved. The ODK 2.0 architecture would allow for
dynamic updates to shared data in a way that would probably support the
functionality you're after -- but ODK 2.0 is still in alpha release.

The SurveyCTO platform has support for lookups into a pre-loaded .csv file,
but it seems unlikely that that would work for your case. That would only
really work if you could put the list of "already taken" ID values into a
.csv file that would be loaded with the form -- but then, the list would
remain fixed. It wouldn't update automatically as new forms were filled
out; rather, you would need to update the .csv attached to the form
manually, and download updated forms/csvs onto your devices occasionally.

To really make it dynamic, you probably need to write your own app to
maintain its own database... unless somebody else has a better idea.

Best,

Chris

··· On Mon, Jun 3, 2013 at 4:15 PM, Coulson Thabo Kgathi wrote:

hi guys i realy need to lookup a value before a form is field to avoid
duplicates .

anyone who has done that already.

or maybe generate a list when every form is created to allow to lookup a
value on that list. the list ma contain an ID of a person.

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

Another solution is to allow duplicates and de-dupe the data on the
server/desktop. If you add deviceID, instanceID, and whatever ID you
want to de-dupe against to the form, it's pretty easy to clean up the
final data.

Yaw

··· -- Need ODK help? Go to http://nafundi.com for custom features, form design, implementation support, and user training for ODK.

On Mon, Jun 3, 2013 at 7:25 AM, Christopher Robert crobert@surveycto.com wrote:

Hi Coulson,

You could write a separate little app that maintains a database of "already
taken" ID values, and only allows entry of non-duplicates. You could then
call that app with an external intent. See, e.g., this entry from the
Collect release notes:

add support for launching an external app to obtain a string, integer or
decimal value. Support is via "ex:intentpath" appearance attribute on
string, integer or decimal input widgets. An example external app is
BreathCounter here
http://code.google.com/p/opendatakit/source/browse?repo=androidextras

If you need to coordinate the avoidance of duplicates across devices, then
that becomes more involved. The ODK 2.0 architecture would allow for dynamic
updates to shared data in a way that would probably support the
functionality you're after -- but ODK 2.0 is still in alpha release.

The SurveyCTO platform has support for lookups into a pre-loaded .csv file,
but it seems unlikely that that would work for your case. That would only
really work if you could put the list of "already taken" ID values into a
.csv file that would be loaded with the form -- but then, the list would
remain fixed. It wouldn't update automatically as new forms were filled out;
rather, you would need to update the .csv attached to the form manually, and
download updated forms/csvs onto your devices occasionally.

To really make it dynamic, you probably need to write your own app to
maintain its own database... unless somebody else has a better idea.

Best,

Chris

On Mon, Jun 3, 2013 at 4:15 PM, Coulson Thabo Kgathi zeecolly@gmail.com wrote:

hi guys i realy need to lookup a value before a form is field to avoid
duplicates .

anyone who has done that already.

or maybe generate a list when every form is created to allow to lookup a
value on that list. the list ma contain an ID of a person.

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

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