Personalized Saving of Instances

Hi all,

ODK offers to save incomplete and complete instances using the name of the
form and the date and time stamp.

This is fine, but it adds an extra step of typing, which I usually try and
avoid as much as possible. Is it possible to have ODK offer to save a form
using a unique/particular instance or a combination of instances of the
collected data?

e.g. If I am entering information about households, and I have specified
Household Head as a unique field, ODK would offer to save instances using
the Household Head name and then add the timestamp the data was added as it
currently does.

How can I do this?

Regards
Kihara

This is a feature others have asked for (see
http://code.google.com/p/opendatakit/issues/detail?id=433).

It's not particularly difficult to do, but we haven't had the time. If
someone wants to build it, we'd be glad to include it in ODK Collect.

··· On Mon, May 14, 2012 at 5:35 PM, Kihara Absolomon wrote: > Hi all, > > ODK offers to save incomplete and complete instances using the name of the > form and the date and time stamp. > > This is fine, but it adds an extra step of typing, which I usually try and > avoid as much as possible. Is it possible to have ODK offer to save a form > using a unique/particular instance or a combination of instances of the > collected data? > > e.g. If I am entering information about households, and I have specified > Household Head as a unique field, ODK would offer to save instances using > the Household Head name and then add the timestamp the data was added as it > currently does. > > How can I do this? > > Regards > Kihara

Thanks. I will take a look.

··· On Tue, May 15, 2012 at 7:07 AM, Yaw Anokwa wrote:

This is a feature others have asked for (see
http://code.google.com/p/opendatakit/issues/detail?id=433).

It's not particularly difficult to do, but we haven't had the time. If
someone wants to build it, we'd be glad to include it in ODK Collect.

On Mon, May 14, 2012 at 5:35 PM, Kihara Absolomon soloincc@gmail.com wrote:

Hi all,

ODK offers to save incomplete and complete instances using the name of
the
form and the date and time stamp.

This is fine, but it adds an extra step of typing, which I usually try
and
avoid as much as possible. Is it possible to have ODK offer to save a
form
using a unique/particular instance or a combination of instances of the
collected data?

e.g. If I am entering information about households, and I have specified
Household Head as a unique field, ODK would offer to save instances using
the Household Head name and then add the timestamp the data was added as
it
currently does.

How can I do this?

Regards
Kihara

Hi all,

I want to take a shot at enabling this feature. I am thinking of tackling
it from the following angle:

Functionality:

  • The form can/should be saved using different ways.
    • Using a unique field in the form, eg using the id field, like
      [id].xml In case there exists an existing entry, maybe append the end
      timestamp!
    • A combination of fields in the form. These should be specified
      somewhere in the form, including the intended format. ie, if name and id
      fields should be used, which format should the name has: No Spaces
      ([name][id].xml), Using an underscore ([name]_[id].xml), etc
    • By a time stamp. This can be time the user started filling the form
      or the time the user saves the form.
  • The way the form should be saved should be specified in the form
    somewhere.

Some questions:

  • Is there an xml field/property that can be used for this purpose, ie
    to specify the saving format?
  • I have seen a function SaveToDiskTask::SaveToDiskTask under
    src/org/odk/collect/android/tasks/SaveToDiskTask.java line 66. I presume
    this is the function used to save the instances. Am I right?

Any pointers/help would be greatly appreciated.

Kihara

··· On Tue, May 15, 2012 at 7:27 AM, Kihara Absolomon wrote:

Thanks. I will take a look.

On Tue, May 15, 2012 at 7:07 AM, Yaw Anokwa yanokwa@gmail.com wrote:

This is a feature others have asked for (see
http://code.google.com/p/opendatakit/issues/detail?id=433).

It's not particularly difficult to do, but we haven't had the time. If
someone wants to build it, we'd be glad to include it in ODK Collect.

On Mon, May 14, 2012 at 5:35 PM, Kihara Absolomon soloincc@gmail.com wrote:

Hi all,

ODK offers to save incomplete and complete instances using the name of
the
form and the date and time stamp.

This is fine, but it adds an extra step of typing, which I usually try
and
avoid as much as possible. Is it possible to have ODK offer to save a
form
using a unique/particular instance or a combination of instances of the
collected data?

e.g. If I am entering information about households, and I have specified
Household Head as a unique field, ODK would offer to save instances
using
the Household Head name and then add the timestamp the data was added
as it
currently does.

How can I do this?

Regards
Kihara

The InstanceProvider has a "DisplayName" and "DisplaySubtext" that can be
modified (I think). These don't alter the directory names on the SDCard,
but they are used by the ODK Collect user interface. This is how you can
name the instance in the final "Mark as Complete" screen of the form.

I think the change would be to generate this name differently. Not sure
how you would tie this into the form definition. That sounds like a
modification to javarosa ( https://bitbucket.org/javarosa/javarosa/wiki/Home).

Mitch

··· On Sat, Jun 2, 2012 at 3:06 AM, Kihara Absolomon wrote:

Hi all,

I want to take a shot at enabling this feature. I am thinking of tackling
it from the following angle:

Functionality:

  • The form can/should be saved using different ways.
    • Using a unique field in the form, eg using the id field, like
      [id].xml In case there exists an existing entry, maybe append the end
      timestamp!
    • A combination of fields in the form. These should be specified
      somewhere in the form, including the intended format. ie, if name and id
      fields should be used, which format should the name has: No Spaces
      ([name][id].xml), Using an underscore ([name]_[id].xml), etc
    • By a time stamp. This can be time the user started filling the
      form or the time the user saves the form.
  • The way the form should be saved should be specified in the form
    somewhere.

Some questions:

  • Is there an xml field/property that can be used for this purpose, ie
    to specify the saving format?
  • I have seen a function SaveToDiskTask::SaveToDiskTask under
    src/org/odk/collect/android/tasks/SaveToDiskTask.java line 66. I presume
    this is the function used to save the instances. Am I right?

Any pointers/help would be greatly appreciated.

Kihara

On Tue, May 15, 2012 at 7:27 AM, Kihara Absolomon soloincc@gmail.comwrote:

Thanks. I will take a look.

On Tue, May 15, 2012 at 7:07 AM, Yaw Anokwa yanokwa@gmail.com wrote:

This is a feature others have asked for (see
http://code.google.com/p/opendatakit/issues/detail?id=433).

It's not particularly difficult to do, but we haven't had the time. If
someone wants to build it, we'd be glad to include it in ODK Collect.

On Mon, May 14, 2012 at 5:35 PM, Kihara Absolomon soloincc@gmail.com wrote:

Hi all,

ODK offers to save incomplete and complete instances using the name of
the
form and the date and time stamp.

This is fine, but it adds an extra step of typing, which I usually try
and
avoid as much as possible. Is it possible to have ODK offer to save a
form
using a unique/particular instance or a combination of instances of the
collected data?

e.g. If I am entering information about households, and I have
specified
Household Head as a unique field, ODK would offer to save instances
using
the Household Head name and then add the timestamp the data was added
as it
currently does.

How can I do this?

Regards
Kihara

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