2.0 subqueries and use of model

Hi team,

I'm getting started with the 2.0 tools and am busy designing forms.

I'm implementing subqueries (like 1.x repeat groups) similar to the
household_member in the example household survey.

In the example given on this page
(https://opendatakit.org/use/2_0_tools/active-distribution/odk-application-designer-2-0-rev200/odk-xlsxconverter-2-0-rev200/#usingQueries)
it says:

The user can click on the create instance button to add new people for this

household.
The house_id will be set automatically for this new member by the
auxillaryHash function.
Note that in this case, the selection criteria (house_id) and it's type
(text) must
be added to the model subset of the subform (members_info) in order for
the subform to be found by
its parent form.

  1. Is it necessary to include the full model in the members_info "model"
    sheet, or is it enough to just list the referenced field? (as generated by
    the auxillaryHash)

  2. Is it enough to add it to the "model" sheet, or do I need to generate
    definition/properties.csv files as well? (I noted these in the example file
    folders but don't know whether/when they are needed)

  3. What is meant by "added to the model subset"? (if not answered above)

Thanks and regards,
Andrew

Thanks for your questions. Please see my response below.

  1. We recommend that you include all of the prompts (or the full model) in
    the model worksheet of an ODK Survey xlsx form. One problem that we've
    encountered when a user chooses to only put prompts in the model worksheet
    that are not defined in the survey worksheet is that the same name could
    accidentally be used for two different prompts. An error like this becomes
    less likely if all the prompts for the survey are listed in the model
    worksheet.

  2. When using the XLSX Converter of the Application Designer to convert an
    xlsx file, you will notice that three files are generated. The
    formDef.json is used by ODK Survey to create a database table for your form
    and to render your survey. The properties.csv and definition.csv files are
    used by ODK Tables to create a database table and set the Tables properties
    for that table. The formDef.json used by Survey and the definition.csv and
    properties.csv files used by Tables should create an equivalent table that
    either tool can use. Future work for us would be to unify these two
    methods. To answer your question, if you are only using Survey, you do not
    need the properties.csv or the definition.csv files. If you are planning
    on using Survey and Tables, having all three files is a good idea.

  3. The phrase "added to the model subset" refers to ensuring that the
    prompt (or database field) that will be used to link your subform to the
    parent form is included in the model worksheet of the subform. This phrase
    is not making the assumption that the user has already defined all of the
    prompts in the model worksheet.

If more questions arise, don't hesitate to ask.

Clarice

ยทยทยท On Fri, May 20, 2016 at 8:07 AM, Andrew wrote:

Hi team,

I'm getting started with the 2.0 tools and am busy designing forms.

I'm implementing subqueries (like 1.x repeat groups) similar to the
household_member in the example household survey.

In the example given on this page (
https://opendatakit.org/use/2_0_tools/active-distribution/odk-application-designer-2-0-rev200/odk-xlsxconverter-2-0-rev200/#usingQueries)
it says:

The user can click on the create instance button to add new people for

this household.
The house_id will be set automatically for this new member by the
auxillaryHash function.
Note that in this case, the selection criteria (house_id) and it's type
(text) must
be added to the model subset of the subform (members_info) in order for
the subform to be found by
its parent form.

  1. Is it necessary to include the full model in the members_info "model"
    sheet, or is it enough to just list the referenced field? (as generated by
    the auxillaryHash)

  2. Is it enough to add it to the "model" sheet, or do I need to generate
    definition/properties.csv files as well? (I noted these in the example file
    folders but don't know whether/when they are needed)

  3. What is meant by "added to the model subset"? (if not answered above)

Thanks and regards,
Andrew

--

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.

1 Like

Great, thanks Clarice for clearing that up.

Regards,
Andrew

ยทยทยท On Monday, 23 May 2016 23:01:16 UTC+2, clarice larson wrote: > > Thanks for your questions. Please see my response below. > > 1. We recommend that you include all of the prompts (or the full model) > in the model worksheet of an ODK Survey xlsx form. One problem that we've > encountered when a user chooses to only put prompts in the model worksheet > that are not defined in the survey worksheet is that the same name could > accidentally be used for two different prompts. An error like this becomes > less likely if all the prompts for the survey are listed in the model > worksheet. > > 2. When using the XLSX Converter of the Application Designer to convert > an xlsx file, you will notice that three files are generated. The > formDef.json is used by ODK Survey to create a database table for your form > and to render your survey. The properties.csv and definition.csv files are > used by ODK Tables to create a database table and set the Tables properties > for that table. The formDef.json used by Survey and the definition.csv and > properties.csv files used by Tables should create an equivalent table that > either tool can use. Future work for us would be to unify these two > methods. To answer your question, if you are only using Survey, you do not > need the properties.csv or the definition.csv files. If you are planning > on using Survey and Tables, having all three files is a good idea. > > 3. The phrase "added to the model subset" refers to ensuring that the > prompt (or database field) that will be used to link your subform to the > parent form is included in the model worksheet of the subform. This phrase > is not making the assumption that the user has already defined all of the > prompts in the model worksheet. > > If more questions arise, don't hesitate to ask. > > Clarice > > On Fri, May 20, 2016 at 8:07 AM, Andrew <acawo...@gmail.com > wrote: > >> Hi team, >> >> I'm getting started with the 2.0 tools and am busy designing forms. >> >> I'm implementing subqueries (like 1.x repeat groups) similar to the >> household_member in the example household survey. >> >> In the example given on this page ( >> https://opendatakit.org/use/2_0_tools/active-distribution/odk-application-designer-2-0-rev200/odk-xlsxconverter-2-0-rev200/#usingQueries) >> it says: >> >> The user can click on the create instance button to add new people for >>> this household. >>> The house_id will be set automatically for this new member by the >>> auxillaryHash function. >>> Note that in this case, the selection criteria (house_id) and it's type >>> (text) must >>> be added to the model subset of the subform (members_info) in order for >>> the subform to be found by >>> its parent form. >>> >> >> 1) Is it necessary to include the full model in the members_info "model" >> sheet, or is it enough to just list the referenced field? (as generated by >> the auxillaryHash) >> >> 2) Is it enough to add it to the "model" sheet, or do I need to generate >> definition/properties.csv files as well? (I noted these in the example file >> folders but don't know whether/when they are needed) >> >> 3) What is meant by "added to the model subset"? (if not answered above) >> >> Thanks and regards, >> Andrew >> >> -- >> -- >> Post: opend...@googlegroups.com >> Unsubscribe: opendatakit...@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...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > >

Hi Clarice,

Can i run a form without properties.csv or the definition.csv files in ODK Survey 2.0.

Thanks & Regards,
Ramana V.

Hi Ramana,

We just announced that the ODK 2.0 release candidates are available for download at https://opendatakit.org/downloads. As of ODK Survey v2.0 RC-1 rev 210.apk, you will also need the properties.csv and definition.csv files.

Clarice