Question on instance name ODK 2.0

Can I use logic for instance name in the settings sheet of a survey worksheet?
Currently I set the instance name to one of the survey fields which works fine. But if I want to combine several fields for the instance name is it possible and if so what is the syntax?

E.g.

setting_name value display.title
form_id fertilizer
form_version 20130408
table_id fertilizer
survey Fertilizer
instance_name fertilizerType

If I want instance_name to be be say fertilizerType+pesticideType what is the syntax? I tried using the '+' for 2 fields but it did not seem to work.

Thanks,
tom

You could create a model worksheet with a new variable named something like
fertilizerPesticideType of type string. Then you could use an assign on
your survey worksheet to set this variable to data('fertilizerType') +
data('pesticideType'). Finally, you could use this variable for
instance_name on your settings worksheet.

I've attached an example of a form that does something similar. This form
concatenates first_name and last_name into variable first_last_name and
uses this variable as the instance_name.

Clarice

screening_form.xlsx (74.8 KB)

··· On Sun, Jun 28, 2015 at 6:25 AM, <7shriner@gmail.com> wrote:

Can I use logic for instance name in the settings sheet of a survey
worksheet?
Currently I set the instance name to one of the survey fields which works
fine. But if I want to combine several fields for the instance name is it
possible and if so what is the syntax?

E.g.

setting_name value display.title
form_id fertilizer
form_version 20130408
table_id fertilizer
survey Fertilizer
instance_name fertilizerType

If I want instance_name to be be say fertilizerType+pesticideType what is
the syntax? I tried using the '+' for 2 fields but it did not seem to work.

Thanks,
tom

--
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/d/optout.

Formulas are problematic. The instance name can only be a field name.

··· On Mon, Jun 29, 2015 at 11:14 AM, clarice larson wrote:

You could create a model worksheet with a new variable named something
like fertilizerPesticideType of type string. Then you could use an assign
on your survey worksheet to set this variable to data('fertilizerType') +
data('pesticideType'). Finally, you could use this variable for
instance_name on your settings worksheet.

I've attached an example of a form that does something similar. This form
concatenates first_name and last_name into variable first_last_name and
uses this variable as the instance_name.

Clarice

On Sun, Jun 28, 2015 at 6:25 AM, 7shriner@gmail.com wrote:

Can I use logic for instance name in the settings sheet of a survey
worksheet?
Currently I set the instance name to one of the survey fields which works
fine. But if I want to combine several fields for the instance name is it
possible and if so what is the syntax?

E.g.

setting_name value display.title
form_id fertilizer
form_version 20130408
table_id fertilizer
survey Fertilizer
instance_name fertilizerType

If I want instance_name to be be say fertilizerType+pesticideType what is
the syntax? I tried using the '+' for 2 fields but it did not seem to work.

Thanks,
tom

--
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/d/optout.

--
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/d/optout.

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