ReferenceError: operation is not defined

I am working on ODK Survey.
I have an excel file that is ODK Collect compatible and I am converting it
to ODK Survey format

In "Calculation" column I have following formula:

if( count-selected(${crop_products_mc_wf_f1}) >= 1,
selected-at(${crop_products_mc_wf_f1},0),'-')

I removed if condition under "clause" column and kept the assign part in
calculation. Still I get following error
ReferenceError: operation is not defined

Can please anyone help to transform this formula or achieve equivalent in
ODK Survey?
I have attached excel file for reference.

Thanks & Regards
Pradnya

FDSurvey1.xlsx (26 KB)

In Survey, we have eliminated the ${} syntax.

Replace any ${fieldname} with data('fieldname')

Since Survey uses Javascript directly for its calculations, we needed to
have a function ( data(arg) ) that took an argument and returned the field
value. ${} would have required transforming the expression text, which we
wanted to eliminate.

w.r.t. calculate expressions, these are wrapped by return statements
internally:

function(...) {
return ( value_from_xlsx_cell );
}

If you are familiar with javascript, this opens up the possibility of doing
anything you want (e.g., calling your own custom functions).

··· On Wed, Jun 4, 2014 at 2:56 AM, Pradnya wrote:

I am working on ODK Survey.
I have an excel file that is ODK Collect compatible and I am converting it
to ODK Survey format

In "Calculation" column I have following formula:

if( count-selected(${crop_products_mc_wf_f1}) >= 1,
selected-at(${crop_products_mc_wf_f1},0),'-')

I removed if condition under "clause" column and kept the assign part in
calculation. Still I get following error
ReferenceError: operation is not defined

Can please anyone help to transform this formula or achieve equivalent in
ODK Survey?
I have attached excel file for reference.

Thanks & Regards
Pradnya

--

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

Hi Mitch
Thanks for your reply.
I changed the expression to
selected-at(data('crop_products_mc_wf_f1'),0)
and it is present under "calculation" column. I still get the error. I
assume that "selected-at" function in not present and I will write custom
function to achieve this.

Thanks & Regards
Pradnya

··· On Wednesday, June 4, 2014 6:44:46 PM UTC+2, Mitch Sundt wrote: > > In Survey, we have eliminated the ${} syntax. > > Replace any ${fieldname} with data('fieldname') > > Since Survey uses Javascript directly for its calculations, we needed to > have a function ( data(arg) ) that took an argument and returned the field > value. ${} would have required transforming the expression text, which we > wanted to eliminate. > > w.r.t. calculate expressions, these are wrapped by return statements > internally: > > function(...) { > return ( value_from_xlsx_cell ); > } > > If you are familiar with javascript, this opens up the possibility of > doing anything you want (e.g., calling your own custom functions). > > > > On Wed, Jun 4, 2014 at 2:56 AM, Pradnya <pska...@gmail.com > wrote: > >> I am working on ODK Survey. >> I have an excel file that is ODK Collect compatible and I am converting >> it to ODK Survey format >> >> In "Calculation" column I have following formula: >> >> if( count-selected(${crop_products_mc_wf_f1}) >= 1, >> selected-at(${crop_products_mc_wf_f1},0),'-') >> >> I removed if condition under "clause" column and kept the assign part in >> calculation. Still I get following error >> ReferenceError: operation is not defined >> >> Can please anyone help to transform this formula or achieve equivalent in >> ODK Survey? >> I have attached excel file for reference. >> >> Thanks & Regards >> Pradnya >> >> -- >> -- >> 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. >> > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com >

Sorry for the confusion.

In ODK Survey, multiple-choice fields are represented as *arrays *of values
directly.

We have defined:

selected( data('fieldname'), 'value')

countSelected( data('fieldname') )

For the selected-at( data('fieldname'), n ) functionality, you can directly
use the javascript subscript [n] notation:

(data('fieldname'))[0] -- to get the first selection
(data('fieldname'))[1] -- to get the second selection

etc.

··· On Wed, Jun 11, 2014 at 12:46 AM, Pradnya wrote:

Hi Mitch
Thanks for your reply.
I changed the expression to
selected-at(data('crop_products_mc_wf_f1'),0)
and it is present under "calculation" column. I still get the error. I
assume that "selected-at" function in not present and I will write custom
function to achieve this.

Thanks & Regards
Pradnya

On Wednesday, June 4, 2014 6:44:46 PM UTC+2, Mitch Sundt wrote:

In Survey, we have eliminated the ${} syntax.

Replace any ${fieldname} with data('fieldname')

Since Survey uses Javascript directly for its calculations, we needed to
have a function ( data(arg) ) that took an argument and returned the field
value. ${} would have required transforming the expression text, which we
wanted to eliminate.

w.r.t. calculate expressions, these are wrapped by return statements
internally:

function(...) {
return ( value_from_xlsx_cell );
}

If you are familiar with javascript, this opens up the possibility of
doing anything you want (e.g., calling your own custom functions).

On Wed, Jun 4, 2014 at 2:56 AM, Pradnya pska...@gmail.com wrote:

I am working on ODK Survey.
I have an excel file that is ODK Collect compatible and I am converting
it to ODK Survey format

In "Calculation" column I have following formula:

if( count-selected(${crop_products_mc_wf_f1}) >= 1,
selected-at(${crop_products_mc_wf_f1},0),'-')

I removed if condition under "clause" column and kept the assign part in
calculation. Still I get following error
ReferenceError: operation is not defined

Can please anyone help to transform this formula or achieve equivalent
in ODK Survey?
I have attached excel file for reference.

Thanks & Regards
Pradnya

--

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.

--
Mitch Sundt
Software Engineer
University of Washington
mitche...@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.

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

Hi Mitch
Thanks for your response.

I still get the same error after using javascript subscript [n] notation.
Please find attached excel file that generates this error

FDSurvey1.xlsx (26 KB)

··· On Wednesday, June 11, 2014 11:03:06 PM UTC+2, Mitch Sundt wrote: > > Sorry for the confusion. > > In ODK Survey, multiple-choice fields are represented as *arrays *of > values directly. > > We have defined: > > selected( data('fieldname'), 'value') > > countSelected( data('fieldname') ) > > For the selected-at( data('fieldname'), n ) functionality, you can > directly use the javascript subscript [n] notation: > > (data('fieldname'))[0] -- to get the first selection > (data('fieldname'))[1] -- to get the second selection > > etc. > > > > > > On Wed, Jun 11, 2014 at 12:46 AM, Pradnya <pska...@gmail.com wrote: > >> Hi Mitch >> Thanks for your reply. >> I changed the expression to >> selected-at(data('crop_products_mc_wf_f1'),0) >> and it is present under "calculation" column. I still get the error. I >> assume that "selected-at" function in not present and I will write custom >> function to achieve this. >> >> >> Thanks & Regards >> Pradnya >> >> >> >> On Wednesday, June 4, 2014 6:44:46 PM UTC+2, Mitch Sundt wrote: >> >>> In Survey, we have eliminated the ${} syntax. >>> >>> Replace any ${fieldname} with data('fieldname') >>> >>> Since Survey uses Javascript directly for its calculations, we needed to >>> have a function ( data(arg) ) that took an argument and returned the field >>> value. ${} would have required transforming the expression text, which we >>> wanted to eliminate. >>> >>> w.r.t. calculate expressions, these are wrapped by return statements >>> internally: >>> >>> function(...) { >>> return ( value_from_xlsx_cell ); >>> } >>> >>> If you are familiar with javascript, this opens up the possibility of >>> doing anything you want (e.g., calling your own custom functions). >>> >>> >>> >>> On Wed, Jun 4, 2014 at 2:56 AM, Pradnya wrote: >>> >>>> I am working on ODK Survey. >>>> I have an excel file that is ODK Collect compatible and I am converting >>>> it to ODK Survey format >>>> >>>> In "Calculation" column I have following formula: >>>> >>>> if( count-selected(${crop_products_mc_wf_f1}) >= 1, >>>> selected-at(${crop_products_mc_wf_f1},0),'-') >>>> >>>> I removed if condition under "clause" column and kept the assign part >>>> in calculation. Still I get following error >>>> ReferenceError: operation is not defined >>>> >>>> Can please anyone help to transform this formula or achieve equivalent >>>> in ODK Survey? >>>> I have attached excel file for reference. >>>> >>>> Thanks & Regards >>>> Pradnya >>>> >>>> -- >>>> -- >>>> 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. >>>> >>> >>> >>> >>> -- >>> Mitch Sundt >>> Software Engineer >>> University of Washington >>> mitche...@gmail.com >>> >> -- >> -- >> 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. >> > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com >

Ah, OK. There is an error in the construction of the error message in
XLSConverter. The error should read:

Field name 'crop_mc_wf_f1_product1' does not have a defined storage type.
Clause: 'assign' at row 16 on sheet: survey. Declare the type on the model
sheet or in a model.type column.

Attached is an updated XLSXConverter.js file that fixes this error message.
Place in in the application designer's xlsxconverter directory.

XLSXConverter.js (110 KB)

··· On Tue, Jun 17, 2014 at 5:36 AM, Pradnya wrote:

Hi Mitch
Thanks for your response.

I still get the same error after using javascript subscript [n] notation.
Please find attached excel file that generates this error

On Wednesday, June 11, 2014 11:03:06 PM UTC+2, Mitch Sundt wrote:

Sorry for the confusion.

In ODK Survey, multiple-choice fields are represented as *arrays *of
values directly.

We have defined:

selected( data('fieldname'), 'value')

countSelected( data('fieldname') )

For the selected-at( data('fieldname'), n ) functionality, you can
directly use the javascript subscript [n] notation:

(data('fieldname'))[0] -- to get the first selection
(data('fieldname'))[1] -- to get the second selection

etc.

On Wed, Jun 11, 2014 at 12:46 AM, Pradnya pska...@gmail.com wrote:

Hi Mitch
Thanks for your reply.
I changed the expression to selected-at(data('crop_
products_mc_wf_f1'),0)
and it is present under "calculation" column. I still get the error. I
assume that "selected-at" function in not present and I will write custom
function to achieve this.

Thanks & Regards
Pradnya

On Wednesday, June 4, 2014 6:44:46 PM UTC+2, Mitch Sundt wrote:

In Survey, we have eliminated the ${} syntax.

Replace any ${fieldname} with data('fieldname')

Since Survey uses Javascript directly for its calculations, we needed
to have a function ( data(arg) ) that took an argument and returned the
field value. ${} would have required transforming the expression text,
which we wanted to eliminate.

w.r.t. calculate expressions, these are wrapped by return statements
internally:

function(...) {
return ( value_from_xlsx_cell );
}

If you are familiar with javascript, this opens up the possibility of
doing anything you want (e.g., calling your own custom functions).

On Wed, Jun 4, 2014 at 2:56 AM, Pradnya pska...@gmail.com wrote:

I am working on ODK Survey.
I have an excel file that is ODK Collect compatible and I am
converting it to ODK Survey format

In "Calculation" column I have following formula:

if( count-selected(${crop_products_mc_wf_f1}) >= 1,
selected-at(${crop_products_mc_wf_f1},0),'-')

I removed if condition under "clause" column and kept the assign part
in calculation. Still I get following error
ReferenceError: operation is not defined

Can please anyone help to transform this formula or achieve equivalent
in ODK Survey?
I have attached excel file for reference.

Thanks & Regards
Pradnya

--

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.

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

--

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.

--
Mitch Sundt
Software Engineer
University of Washington
mitche...@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.

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

Thanks for the updated .js file. I have placed it in the appropriate
folder.

I have tried both options: i.e.

  1. Added model.type column in "survey" sheet [Attachment: FDSurvey1.xlsx ]
  2. Added sheet "model" and defined "crop_mc_wf_f1_product1" as text
    [Attachment:FDSurvey1.xlsx ]

Both of the files give the new error which you have already mentioned below.

FDSurvey1.xlsx (26.2 KB)

FDSurvey2.xlsx (26.7 KB)

··· On Tuesday, June 17, 2014 6:04:03 PM UTC+2, Mitch Sundt wrote: > > Ah, OK. There is an error in the construction of the error message in > XLSConverter. The error should read: > > Field name 'crop_mc_wf_f1_product1' does not have a defined storage type. > Clause: 'assign' at row 16 on sheet: survey. Declare the type on the model > sheet or in a model.type column. > > Attached is an updated XLSXConverter.js file that fixes this error > message. Place in in the application designer's xlsxconverter directory. > > > > On Tue, Jun 17, 2014 at 5:36 AM, Pradnya <pska...@gmail.com > wrote: > >> Hi Mitch >> Thanks for your response. >> >> I still get the same error after using javascript subscript [n] notation. >> Please find attached excel file that generates this error >> >> >> On Wednesday, June 11, 2014 11:03:06 PM UTC+2, Mitch Sundt wrote: >> >>> Sorry for the confusion. >>> >>> In ODK Survey, multiple-choice fields are represented as *arrays *of >>> values directly. >>> >>> We have defined: >>> >>> selected( data('fieldname'), 'value') >>> >>> countSelected( data('fieldname') ) >>> >>> For the selected-at( data('fieldname'), n ) functionality, you can >>> directly use the javascript subscript [n] notation: >>> >>> (data('fieldname'))[0] -- to get the first selection >>> (data('fieldname'))[1] -- to get the second selection >>> >>> etc. >>> >>> >>> >>> >>> >>> On Wed, Jun 11, 2014 at 12:46 AM, Pradnya wrote: >>> >>>> Hi Mitch >>>> Thanks for your reply. >>>> I changed the expression to selected-at(data('crop_ >>>> products_mc_wf_f1'),0) >>>> and it is present under "calculation" column. I still get the error. I >>>> assume that "selected-at" function in not present and I will write custom >>>> function to achieve this. >>>> >>>> >>>> Thanks & Regards >>>> Pradnya >>>> >>>> >>>> >>>> On Wednesday, June 4, 2014 6:44:46 PM UTC+2, Mitch Sundt wrote: >>>> >>>>> In Survey, we have eliminated the ${} syntax. >>>>> >>>>> Replace any ${fieldname} with data('fieldname') >>>>> >>>>> Since Survey uses Javascript directly for its calculations, we needed >>>>> to have a function ( data(arg) ) that took an argument and returned the >>>>> field value. ${} would have required transforming the expression text, >>>>> which we wanted to eliminate. >>>>> >>>>> w.r.t. calculate expressions, these are wrapped by return statements >>>>> internally: >>>>> >>>>> function(...) { >>>>> return ( value_from_xlsx_cell ); >>>>> } >>>>> >>>>> If you are familiar with javascript, this opens up the possibility of >>>>> doing anything you want (e.g., calling your own custom functions). >>>>> >>>>> >>>>> >>>>> On Wed, Jun 4, 2014 at 2:56 AM, Pradnya wrote: >>>>> >>>>>> I am working on ODK Survey. >>>>>> I have an excel file that is ODK Collect compatible and I am >>>>>> converting it to ODK Survey format >>>>>> >>>>>> In "Calculation" column I have following formula: >>>>>> >>>>>> if( count-selected(${crop_products_mc_wf_f1}) >= 1, >>>>>> selected-at(${crop_products_mc_wf_f1},0),'-') >>>>>> >>>>>> I removed if condition under "clause" column and kept the assign part >>>>>> in calculation. Still I get following error >>>>>> ReferenceError: operation is not defined >>>>>> >>>>>> Can please anyone help to transform this formula or achieve >>>>>> equivalent in ODK Survey? >>>>>> I have attached excel file for reference. >>>>>> >>>>>> Thanks & Regards >>>>>> Pradnya >>>>>> >>>>>> -- >>>>>> -- >>>>>> 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. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Mitch Sundt >>>>> Software Engineer >>>>> University of Washington >>>>> mitche...@gmail.com >>>>> >>>> -- >>>> -- >>>> 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. >>>> >>> >>> >>> >>> -- >>> Mitch Sundt >>> Software Engineer >>> University of Washington >>> mitche...@gmail.com >>> >> -- >> -- >> 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. >> > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com >

Give the attached file a try. I modified your FDSurvey1.xlsx file to
include a row that defines the "crop_mc_wf_f1_product1" as type text. I
also changed the values in the required column of your survey worksheet to
TRUE since putting evaluates to an error. Finally, I noticed that you are
using ${name_field1} in the display.text column. The new syntax is
{{data.}}. For example, if you wanted to display the data of the
prompt tenure_field1, you would use {{data.tenure_field1}}.

Clarice

FDSurvey.xlsx (25.1 KB)

··· On Wed, Jun 18, 2014 at 6:14 AM, Pradnya wrote:

Thanks for the updated .js file. I have placed it in the appropriate
folder.

I have tried both options: i.e.

  1. Added model.type column in "survey" sheet [Attachment: FDSurvey1.xlsx ]
  2. Added sheet "model" and defined "crop_mc_wf_f1_product1" as text
    [Attachment:FDSurvey1.xlsx ]

Both of the files give the new error which you have already mentioned
below.

On Tuesday, June 17, 2014 6:04:03 PM UTC+2, Mitch Sundt wrote:

Ah, OK. There is an error in the construction of the error message in
XLSConverter. The error should read:

Field name 'crop_mc_wf_f1_product1' does not have a defined storage type.
Clause: 'assign' at row 16 on sheet: survey. Declare the type on the model
sheet or in a model.type column.

Attached is an updated XLSXConverter.js file that fixes this error
message. Place in in the application designer's xlsxconverter directory.

On Tue, Jun 17, 2014 at 5:36 AM, Pradnya pska...@gmail.com wrote:

Hi Mitch
Thanks for your response.

I still get the same error after using javascript subscript [n]
notation.
Please find attached excel file that generates this error

On Wednesday, June 11, 2014 11:03:06 PM UTC+2, Mitch Sundt wrote:

Sorry for the confusion.

In ODK Survey, multiple-choice fields are represented as *arrays *of
values directly.

We have defined:

selected( data('fieldname'), 'value')

countSelected( data('fieldname') )

For the selected-at( data('fieldname'), n ) functionality, you can
directly use the javascript subscript [n] notation:

(data('fieldname'))[0] -- to get the first selection
(data('fieldname'))[1] -- to get the second selection

etc.

On Wed, Jun 11, 2014 at 12:46 AM, Pradnya pska...@gmail.com wrote:

Hi Mitch
Thanks for your reply.
I changed the expression to selected-at(data('crop_product
s_mc_wf_f1'),0)
and it is present under "calculation" column. I still get the error.
I assume that "selected-at" function in not present and I will write custom
function to achieve this.

Thanks & Regards
Pradnya

On Wednesday, June 4, 2014 6:44:46 PM UTC+2, Mitch Sundt wrote:

In Survey, we have eliminated the ${} syntax.

Replace any ${fieldname} with data('fieldname')

Since Survey uses Javascript directly for its calculations, we needed
to have a function ( data(arg) ) that took an argument and returned the
field value. ${} would have required transforming the expression text,
which we wanted to eliminate.

w.r.t. calculate expressions, these are wrapped by return statements
internally:

function(...) {
return ( value_from_xlsx_cell );
}

If you are familiar with javascript, this opens up the possibility of
doing anything you want (e.g., calling your own custom functions).

On Wed, Jun 4, 2014 at 2:56 AM, Pradnya pska...@gmail.com wrote:

I am working on ODK Survey.
I have an excel file that is ODK Collect compatible and I am
converting it to ODK Survey format

In "Calculation" column I have following formula:

if( count-selected(${crop_products_mc_wf_f1}) >= 1,
selected-at(${crop_products_mc_wf_f1},0),'-')

I removed if condition under "clause" column and kept the assign
part in calculation. Still I get following error
ReferenceError: operation is not defined

Can please anyone help to transform this formula or achieve
equivalent in ODK Survey?
I have attached excel file for reference.

Thanks & Regards
Pradnya

--

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.

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

--

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.

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

--

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.

--
Mitch Sundt
Software Engineer
University of Washington
mitche...@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.

Thanks Clarice for your help!
It works, I get translated formDef.json file now. In the "Preview" tab I
can see my form. But when I click on it , nothing happens..Nothing changes
on the screen. I have attached the java-script console output.The error is
at line number 92. The error message is hard to understand.

Any help is appreciated
Thanks again

ODK_error.txt (7.02 KB)

··· On Wednesday, June 18, 2014 10:22:18 PM UTC+2, clarice larson wrote: > > Give the attached file a try. I modified your FDSurvey1.xlsx file to > include a row that defines the "crop_mc_wf_f1_product1" as type text. I > also changed the values in the required column of your survey worksheet to > TRUE since putting evaluates to an error. Finally, I noticed that you are > using ${name_field1} in the display.text column. The new syntax is > {{data.}}. For example, if you wanted to display the data of the > prompt tenure_field1, you would use {{data.tenure_field1}}. > > Clarice > > > On Wed, Jun 18, 2014 at 6:14 AM, Pradnya <pska...@gmail.com > wrote: > >> Thanks for the updated .js file. I have placed it in the appropriate >> folder. >> >> I have tried both options: i.e. >> 1. Added model.type column in "survey" sheet [Attachment: FDSurvey1.xlsx ] >> 2. Added sheet "model" and defined "crop_mc_wf_f1_product1" as text >> [Attachment:FDSurvey1.xlsx ] >> >> Both of the files give the new error which you have already mentioned >> below. >> >> >> >> On Tuesday, June 17, 2014 6:04:03 PM UTC+2, Mitch Sundt wrote: >> >>> Ah, OK. There is an error in the construction of the error message in >>> XLSConverter. The error should read: >>> >>> Field name 'crop_mc_wf_f1_product1' does not have a defined storage >>> type. Clause: 'assign' at row 16 on sheet: survey. Declare the type on the >>> model sheet or in a model.type column. >>> >>> Attached is an updated XLSXConverter.js file that fixes this error >>> message. Place in in the application designer's xlsxconverter directory. >>> >>> >>> >>> On Tue, Jun 17, 2014 at 5:36 AM, Pradnya wrote: >>> >>>> Hi Mitch >>>> Thanks for your response. >>>> >>>> I still get the same error after using javascript subscript [n] >>>> notation. >>>> Please find attached excel file that generates this error >>>> >>>> >>>> On Wednesday, June 11, 2014 11:03:06 PM UTC+2, Mitch Sundt wrote: >>>> >>>>> Sorry for the confusion. >>>>> >>>>> In ODK Survey, multiple-choice fields are represented as *arrays *of >>>>> values directly. >>>>> >>>>> We have defined: >>>>> >>>>> selected( data('fieldname'), 'value') >>>>> >>>>> countSelected( data('fieldname') ) >>>>> >>>>> For the selected-at( data('fieldname'), n ) functionality, you can >>>>> directly use the javascript subscript [n] notation: >>>>> >>>>> (data('fieldname'))[0] -- to get the first selection >>>>> (data('fieldname'))[1] -- to get the second selection >>>>> >>>>> etc. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On Wed, Jun 11, 2014 at 12:46 AM, Pradnya wrote: >>>>> >>>>>> Hi Mitch >>>>>> Thanks for your reply. >>>>>> I changed the expression to selected-at(data('crop_product >>>>>> s_mc_wf_f1'),0) >>>>>> and it is present under "calculation" column. I still get the error. >>>>>> I assume that "selected-at" function in not present and I will write custom >>>>>> function to achieve this. >>>>>> >>>>>> >>>>>> Thanks & Regards >>>>>> Pradnya >>>>>> >>>>>> >>>>>> >>>>>> On Wednesday, June 4, 2014 6:44:46 PM UTC+2, Mitch Sundt wrote: >>>>>> >>>>>>> In Survey, we have eliminated the ${} syntax. >>>>>>> >>>>>>> Replace any ${fieldname} with data('fieldname') >>>>>>> >>>>>>> Since Survey uses Javascript directly for its calculations, we >>>>>>> needed to have a function ( data(arg) ) that took an argument and returned >>>>>>> the field value. ${} would have required transforming the expression text, >>>>>>> which we wanted to eliminate. >>>>>>> >>>>>>> w.r.t. calculate expressions, these are wrapped by return statements >>>>>>> internally: >>>>>>> >>>>>>> function(...) { >>>>>>> return ( value_from_xlsx_cell ); >>>>>>> } >>>>>>> >>>>>>> If you are familiar with javascript, this opens up the possibility >>>>>>> of doing anything you want (e.g., calling your own custom functions). >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Wed, Jun 4, 2014 at 2:56 AM, Pradnya wrote: >>>>>>> >>>>>>>> I am working on ODK Survey. >>>>>>>> I have an excel file that is ODK Collect compatible and I am >>>>>>>> converting it to ODK Survey format >>>>>>>> >>>>>>>> In "Calculation" column I have following formula: >>>>>>>> >>>>>>>> if( count-selected(${crop_products_mc_wf_f1}) >= 1, >>>>>>>> selected-at(${crop_products_mc_wf_f1},0),'-') >>>>>>>> >>>>>>>> I removed if condition under "clause" column and kept the assign >>>>>>>> part in calculation. Still I get following error >>>>>>>> ReferenceError: operation is not defined >>>>>>>> >>>>>>>> Can please anyone help to transform this formula or achieve >>>>>>>> equivalent in ODK Survey? >>>>>>>> I have attached excel file for reference. >>>>>>>> >>>>>>>> Thanks & Regards >>>>>>>> Pradnya >>>>>>>> >>>>>>>> -- >>>>>>>> -- >>>>>>>> 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. >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Mitch Sundt >>>>>>> Software Engineer >>>>>>> University of Washington >>>>>>> mitche...@gmail.com >>>>>>> >>>>>> -- >>>>>> -- >>>>>> 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. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Mitch Sundt >>>>> Software Engineer >>>>> University of Washington >>>>> mitche...@gmail.com >>>>> >>>> -- >>>> -- >>>> 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. >>>> >>> >>> >>> >>> -- >>> Mitch Sundt >>> Software Engineer >>> University of Washington >>> mitche...@gmail.com >>> >> -- >> -- >> 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. >> > >

Here is the excel file, I have updated display.text column and used the new
syntax to display the data of the prompts.

Pradnya

FDSurvey.xlsx (25 KB)

··· On Wednesday, June 18, 2014 10:22:18 PM UTC+2, clarice larson wrote: > > Give the attached file a try. I modified your FDSurvey1.xlsx file to > include a row that defines the "crop_mc_wf_f1_product1" as type text. I > also changed the values in the required column of your survey worksheet to > TRUE since putting evaluates to an error. Finally, I noticed that you are > using ${name_field1} in the display.text column. The new syntax is > {{data.}}. For example, if you wanted to display the data of the > prompt tenure_field1, you would use {{data.tenure_field1}}. > > Clarice > > > On Wed, Jun 18, 2014 at 6:14 AM, Pradnya <pska...@gmail.com > wrote: > >> Thanks for the updated .js file. I have placed it in the appropriate >> folder. >> >> I have tried both options: i.e. >> 1. Added model.type column in "survey" sheet [Attachment: FDSurvey1.xlsx ] >> 2. Added sheet "model" and defined "crop_mc_wf_f1_product1" as text >> [Attachment:FDSurvey1.xlsx ] >> >> Both of the files give the new error which you have already mentioned >> below. >> >> >> >> On Tuesday, June 17, 2014 6:04:03 PM UTC+2, Mitch Sundt wrote: >> >>> Ah, OK. There is an error in the construction of the error message in >>> XLSConverter. The error should read: >>> >>> Field name 'crop_mc_wf_f1_product1' does not have a defined storage >>> type. Clause: 'assign' at row 16 on sheet: survey. Declare the type on the >>> model sheet or in a model.type column. >>> >>> Attached is an updated XLSXConverter.js file that fixes this error >>> message. Place in in the application designer's xlsxconverter directory. >>> >>> >>> >>> On Tue, Jun 17, 2014 at 5:36 AM, Pradnya wrote: >>> >>>> Hi Mitch >>>> Thanks for your response. >>>> >>>> I still get the same error after using javascript subscript [n] >>>> notation. >>>> Please find attached excel file that generates this error >>>> >>>> >>>> On Wednesday, June 11, 2014 11:03:06 PM UTC+2, Mitch Sundt wrote: >>>> >>>>> Sorry for the confusion. >>>>> >>>>> In ODK Survey, multiple-choice fields are represented as *arrays *of >>>>> values directly. >>>>> >>>>> We have defined: >>>>> >>>>> selected( data('fieldname'), 'value') >>>>> >>>>> countSelected( data('fieldname') ) >>>>> >>>>> For the selected-at( data('fieldname'), n ) functionality, you can >>>>> directly use the javascript subscript [n] notation: >>>>> >>>>> (data('fieldname'))[0] -- to get the first selection >>>>> (data('fieldname'))[1] -- to get the second selection >>>>> >>>>> etc. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On Wed, Jun 11, 2014 at 12:46 AM, Pradnya wrote: >>>>> >>>>>> Hi Mitch >>>>>> Thanks for your reply. >>>>>> I changed the expression to selected-at(data('crop_product >>>>>> s_mc_wf_f1'),0) >>>>>> and it is present under "calculation" column. I still get the error. >>>>>> I assume that "selected-at" function in not present and I will write custom >>>>>> function to achieve this. >>>>>> >>>>>> >>>>>> Thanks & Regards >>>>>> Pradnya >>>>>> >>>>>> >>>>>> >>>>>> On Wednesday, June 4, 2014 6:44:46 PM UTC+2, Mitch Sundt wrote: >>>>>> >>>>>>> In Survey, we have eliminated the ${} syntax. >>>>>>> >>>>>>> Replace any ${fieldname} with data('fieldname') >>>>>>> >>>>>>> Since Survey uses Javascript directly for its calculations, we >>>>>>> needed to have a function ( data(arg) ) that took an argument and returned >>>>>>> the field value. ${} would have required transforming the expression text, >>>>>>> which we wanted to eliminate. >>>>>>> >>>>>>> w.r.t. calculate expressions, these are wrapped by return statements >>>>>>> internally: >>>>>>> >>>>>>> function(...) { >>>>>>> return ( value_from_xlsx_cell ); >>>>>>> } >>>>>>> >>>>>>> If you are familiar with javascript, this opens up the possibility >>>>>>> of doing anything you want (e.g., calling your own custom functions). >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Wed, Jun 4, 2014 at 2:56 AM, Pradnya wrote: >>>>>>> >>>>>>>> I am working on ODK Survey. >>>>>>>> I have an excel file that is ODK Collect compatible and I am >>>>>>>> converting it to ODK Survey format >>>>>>>> >>>>>>>> In "Calculation" column I have following formula: >>>>>>>> >>>>>>>> if( count-selected(${crop_products_mc_wf_f1}) >= 1, >>>>>>>> selected-at(${crop_products_mc_wf_f1},0),'-') >>>>>>>> >>>>>>>> I removed if condition under "clause" column and kept the assign >>>>>>>> part in calculation. Still I get following error >>>>>>>> ReferenceError: operation is not defined >>>>>>>> >>>>>>>> Can please anyone help to transform this formula or achieve >>>>>>>> equivalent in ODK Survey? >>>>>>>> I have attached excel file for reference. >>>>>>>> >>>>>>>> Thanks & Regards >>>>>>>> Pradnya >>>>>>>> >>>>>>>> -- >>>>>>>> -- >>>>>>>> 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. >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Mitch Sundt >>>>>>> Software Engineer >>>>>>> University of Washington >>>>>>> mitche...@gmail.com >>>>>>> >>>>>> -- >>>>>> -- >>>>>> 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. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Mitch Sundt >>>>> Software Engineer >>>>> University of Washington >>>>> mitche...@gmail.com >>>>> >>>> -- >>>> -- >>>> 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. >>>> >>> >>> >>> >>> -- >>> Mitch Sundt >>> Software Engineer >>> University of Washington >>> mitche...@gmail.com >>> >> -- >> -- >> 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. >> > >

Thank you for taking the time to provide the log. The warning in the
ODK_error.txt files does happen on occasion during normal operation and is
not necessarily indicative of an error condition.

I was able to generate a formDef.json from your latest excel file and
navigate through your form using the Application Designer. A few questions
come to mind.

  1. Are you using the development tip of the opendatakit.survey-js repo?
  2. For clarification, have you modified the framework.xlsx file to include
    your new form and generated the appropriate formDef.json for these changes?
  3. In the Preview tab of the Application Designer, are you able to
    navigate through the other example forms without any issues?
  4. Presumably you opened a console and typed 'grunt' in your
    opendatakit.survey-js directory in order to open up the Application
    Designer. In that console window, do you see any errors?

Clarice

··· On Mon, Jun 23, 2014 at 7:11 AM, Pradnya wrote:

Here is the excel file, I have updated display.text column and used the
new syntax to display the data of the prompts.

Pradnya

On Wednesday, June 18, 2014 10:22:18 PM UTC+2, clarice larson wrote:

Give the attached file a try. I modified your FDSurvey1.xlsx file to
include a row that defines the "crop_mc_wf_f1_product1" as type text. I
also changed the values in the required column of your survey worksheet to
TRUE since putting evaluates to an error. Finally, I noticed that you are
using ${name_field1} in the display.text column. The new syntax is
{{data.}}. For example, if you wanted to display the data of the
prompt tenure_field1, you would use {{data.tenure_field1}}.

Clarice

On Wed, Jun 18, 2014 at 6:14 AM, Pradnya pska...@gmail.com wrote:

Thanks for the updated .js file. I have placed it in the appropriate
folder.

I have tried both options: i.e.

  1. Added model.type column in "survey" sheet [Attachment: FDSurvey1.xlsx
    ]
  2. Added sheet "model" and defined "crop_mc_wf_f1_product1" as text
    [Attachment:FDSurvey1.xlsx ]

Both of the files give the new error which you have already mentioned
below.

On Tuesday, June 17, 2014 6:04:03 PM UTC+2, Mitch Sundt wrote:

Ah, OK. There is an error in the construction of the error message in
XLSConverter. The error should read:

Field name 'crop_mc_wf_f1_product1' does not have a defined storage
type. Clause: 'assign' at row 16 on sheet: survey. Declare the type on the
model sheet or in a model.type column.

Attached is an updated XLSXConverter.js file that fixes this error
message. Place in in the application designer's xlsxconverter directory.

On Tue, Jun 17, 2014 at 5:36 AM, Pradnya pska...@gmail.com wrote:

Hi Mitch
Thanks for your response.

I still get the same error after using javascript subscript [n]
notation.
Please find attached excel file that generates this error

On Wednesday, June 11, 2014 11:03:06 PM UTC+2, Mitch Sundt wrote:

Sorry for the confusion.

In ODK Survey, multiple-choice fields are represented as *arrays *of
values directly.

We have defined:

selected( data('fieldname'), 'value')

countSelected( data('fieldname') )

For the selected-at( data('fieldname'), n ) functionality, you can
directly use the javascript subscript [n] notation:

(data('fieldname'))[0] -- to get the first selection
(data('fieldname'))[1] -- to get the second selection

etc.

On Wed, Jun 11, 2014 at 12:46 AM, Pradnya pska...@gmail.com wrote:

Hi Mitch
Thanks for your reply.
I changed the expression to selected-at(data('crop_product
s_mc_wf_f1'),0)
and it is present under "calculation" column. I still get the
error. I assume that "selected-at" function in not present and I will write
custom function to achieve this.

Thanks & Regards
Pradnya

On Wednesday, June 4, 2014 6:44:46 PM UTC+2, Mitch Sundt wrote:

In Survey, we have eliminated the ${} syntax.

Replace any ${fieldname} with data('fieldname')

Since Survey uses Javascript directly for its calculations, we
needed to have a function ( data(arg) ) that took an argument and returned
the field value. ${} would have required transforming the expression text,
which we wanted to eliminate.

w.r.t. calculate expressions, these are wrapped by return
statements internally:

function(...) {
return ( value_from_xlsx_cell );
}

If you are familiar with javascript, this opens up the possibility
of doing anything you want (e.g., calling your own custom functions).

On Wed, Jun 4, 2014 at 2:56 AM, Pradnya pska...@gmail.com wrote:

I am working on ODK Survey.
I have an excel file that is ODK Collect compatible and I am
converting it to ODK Survey format

In "Calculation" column I have following formula:

if( count-selected(${crop_products_mc_wf_f1}) >= 1,
selected-at(${crop_products_mc_wf_f1},0),'-')

I removed if condition under "clause" column and kept the assign
part in calculation. Still I get following error
ReferenceError: operation is not defined

Can please anyone help to transform this formula or achieve
equivalent in ODK Survey?
I have attached excel file for reference.

Thanks & Regards
Pradnya

--

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.

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

--

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.

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

--

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.

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

--

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.

--
--
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.

Here are the answers to your questions,

  1. I am using "ODK ApplicationDesigner v2.0 Alpha-1"
  2. Yes, I have modified the framework.xlsx file to include my new form and
    generated the appropriate formDef.json for these changes. For your
    reference I have attached framework.xlsx and it's corresponding
    formDef.json file.
  3. In the Preview tab of the Application Designer, I can navigate through
    all the example forms (these forms came as a part of Application Designer)
  4. Yes, I opened the console window and ran "grunt" command to start the
    Application Designer and in that window there are no errors generated when
    I click on my form.

Thanks for your help
Pradnya

formDef.json (32.3 KB)

framework.xlsx (13.2 KB)

··· On Monday, June 23, 2014 7:20:28 PM UTC+2, clarice larson wrote: > > Thank you for taking the time to provide the log. The warning in the > ODK_error.txt files does happen on occasion during normal operation and is > not necessarily indicative of an error condition. > > I was able to generate a formDef.json from your latest excel file and > navigate through your form using the Application Designer. A few questions > come to mind. > > 1. Are you using the development tip of the opendatakit.survey-js repo? > 2. For clarification, have you modified the framework.xlsx file to > include your new form and generated the appropriate formDef.json for these > changes? > 3. In the Preview tab of the Application Designer, are you able to > navigate through the other example forms without any issues? > 4. Presumably you opened a console and typed 'grunt' in your > opendatakit.survey-js directory in order to open up the Application > Designer. In that console window, do you see any errors? > > Clarice > > > On Mon, Jun 23, 2014 at 7:11 AM, Pradnya <pska...@gmail.com > wrote: > >> Here is the excel file, I have updated display.text column and used the >> new syntax to display the data of the prompts. >> >> Pradnya >> >> On Wednesday, June 18, 2014 10:22:18 PM UTC+2, clarice larson wrote: >> >>> Give the attached file a try. I modified your FDSurvey1.xlsx file to >>> include a row that defines the "crop_mc_wf_f1_product1" as type text. I >>> also changed the values in the required column of your survey worksheet to >>> TRUE since putting evaluates to an error. Finally, I noticed that you are >>> using ${name_field1} in the display.text column. The new syntax is >>> {{data.}}. For example, if you wanted to display the data of the >>> prompt tenure_field1, you would use {{data.tenure_field1}}. >>> >>> Clarice >>> >>> >>> On Wed, Jun 18, 2014 at 6:14 AM, Pradnya wrote: >>> >>>> Thanks for the updated .js file. I have placed it in the appropriate >>>> folder. >>>> >>>> I have tried both options: i.e. >>>> 1. Added model.type column in "survey" sheet [Attachment: >>>> FDSurvey1.xlsx ] >>>> 2. Added sheet "model" and defined "crop_mc_wf_f1_product1" as text >>>> [Attachment:FDSurvey1.xlsx ] >>>> >>>> Both of the files give the new error which you have already mentioned >>>> below. >>>> >>>> >>>> >>>> On Tuesday, June 17, 2014 6:04:03 PM UTC+2, Mitch Sundt wrote: >>>> >>>>> Ah, OK. There is an error in the construction of the error message in >>>>> XLSConverter. The error should read: >>>>> >>>>> Field name 'crop_mc_wf_f1_product1' does not have a defined storage >>>>> type. Clause: 'assign' at row 16 on sheet: survey. Declare the type on the >>>>> model sheet or in a model.type column. >>>>> >>>>> Attached is an updated XLSXConverter.js file that fixes this error >>>>> message. Place in in the application designer's xlsxconverter directory. >>>>> >>>>> >>>>> >>>>> On Tue, Jun 17, 2014 at 5:36 AM, Pradnya wrote: >>>>> >>>>>> Hi Mitch >>>>>> Thanks for your response. >>>>>> >>>>>> I still get the same error after using javascript subscript [n] >>>>>> notation. >>>>>> Please find attached excel file that generates this error >>>>>> >>>>>> >>>>>> On Wednesday, June 11, 2014 11:03:06 PM UTC+2, Mitch Sundt wrote: >>>>>> >>>>>>> Sorry for the confusion. >>>>>>> >>>>>>> In ODK Survey, multiple-choice fields are represented as *arrays *of >>>>>>> values directly. >>>>>>> >>>>>>> We have defined: >>>>>>> >>>>>>> selected( data('fieldname'), 'value') >>>>>>> >>>>>>> countSelected( data('fieldname') ) >>>>>>> >>>>>>> For the selected-at( data('fieldname'), n ) functionality, you can >>>>>>> directly use the javascript subscript [n] notation: >>>>>>> >>>>>>> (data('fieldname'))[0] -- to get the first selection >>>>>>> (data('fieldname'))[1] -- to get the second selection >>>>>>> >>>>>>> etc. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Wed, Jun 11, 2014 at 12:46 AM, Pradnya wrote: >>>>>>> >>>>>>>> Hi Mitch >>>>>>>> Thanks for your reply. >>>>>>>> I changed the expression to selected-at(data('crop_product >>>>>>>> s_mc_wf_f1'),0) >>>>>>>> and it is present under "calculation" column. I still get the >>>>>>>> error. I assume that "selected-at" function in not present and I will write >>>>>>>> custom function to achieve this. >>>>>>>> >>>>>>>> >>>>>>>> Thanks & Regards >>>>>>>> Pradnya >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Wednesday, June 4, 2014 6:44:46 PM UTC+2, Mitch Sundt wrote: >>>>>>>> >>>>>>>>> In Survey, we have eliminated the ${} syntax. >>>>>>>>> >>>>>>>>> Replace any ${fieldname} with data('fieldname') >>>>>>>>> >>>>>>>>> Since Survey uses Javascript directly for its calculations, we >>>>>>>>> needed to have a function ( data(arg) ) that took an argument and returned >>>>>>>>> the field value. ${} would have required transforming the expression text, >>>>>>>>> which we wanted to eliminate. >>>>>>>>> >>>>>>>>> w.r.t. calculate expressions, these are wrapped by return >>>>>>>>> statements internally: >>>>>>>>> >>>>>>>>> function(...) { >>>>>>>>> return ( value_from_xlsx_cell ); >>>>>>>>> } >>>>>>>>> >>>>>>>>> If you are familiar with javascript, this opens up the possibility >>>>>>>>> of doing anything you want (e.g., calling your own custom functions). >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On Wed, Jun 4, 2014 at 2:56 AM, Pradnya wrote: >>>>>>>>> >>>>>>>>>> I am working on ODK Survey. >>>>>>>>>> I have an excel file that is ODK Collect compatible and I am >>>>>>>>>> converting it to ODK Survey format >>>>>>>>>> >>>>>>>>>> In "Calculation" column I have following formula: >>>>>>>>>> >>>>>>>>>> if( count-selected(${crop_products_mc_wf_f1}) >= 1, >>>>>>>>>> selected-at(${crop_products_mc_wf_f1},0),'-') >>>>>>>>>> >>>>>>>>>> I removed if condition under "clause" column and kept the assign >>>>>>>>>> part in calculation. Still I get following error >>>>>>>>>> ReferenceError: operation is not defined >>>>>>>>>> >>>>>>>>>> Can please anyone help to transform this formula or achieve >>>>>>>>>> equivalent in ODK Survey? >>>>>>>>>> I have attached excel file for reference. >>>>>>>>>> >>>>>>>>>> Thanks & Regards >>>>>>>>>> Pradnya >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> -- >>>>>>>>>> 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. >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Mitch Sundt >>>>>>>>> Software Engineer >>>>>>>>> University of Washington >>>>>>>>> mitche...@gmail.com >>>>>>>>> >>>>>>>> -- >>>>>>>> -- >>>>>>>> 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. >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Mitch Sundt >>>>>>> Software Engineer >>>>>>> University of Washington >>>>>>> mitche...@gmail.com >>>>>>> >>>>>> -- >>>>>> -- >>>>>> 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. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Mitch Sundt >>>>> Software Engineer >>>>> University of Washington >>>>> mitche...@gmail.com >>>>> >>>> -- >>>> -- >>>> 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. >>>> >>> >>> -- >> -- >> 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. >> > >

Please can anyone help me to resolve the issue mentioned in this thread????

Thanks

··· On Tuesday, June 24, 2014 10:36:36 AM UTC+2, Pradnya wrote: > > Here are the answers to your questions, > > 1. I am using "ODK ApplicationDesigner v2.0 Alpha-1" > 2. Yes, I have modified the framework.xlsx file to include my new form and > generated the appropriate formDef.json for these changes. For your > reference I have attached framework.xlsx and it's corresponding > formDef.json file. > 3. In the Preview tab of the Application Designer, I can navigate through > all the example forms (these forms came as a part of Application Designer) > 4. Yes, I opened the console window and ran "grunt" command to start the > Application Designer and in that window there are no errors generated when > I click on my form. > > Thanks for your help > Pradnya > > > On Monday, June 23, 2014 7:20:28 PM UTC+2, clarice larson wrote: >> >> Thank you for taking the time to provide the log. The warning in the >> ODK_error.txt files does happen on occasion during normal operation and is >> not necessarily indicative of an error condition. >> >> I was able to generate a formDef.json from your latest excel file and >> navigate through your form using the Application Designer. A few questions >> come to mind. >> >> 1. Are you using the development tip of the opendatakit.survey-js repo? >> 2. For clarification, have you modified the framework.xlsx file to >> include your new form and generated the appropriate formDef.json for these >> changes? >> 3. In the Preview tab of the Application Designer, are you able to >> navigate through the other example forms without any issues? >> 4. Presumably you opened a console and typed 'grunt' in your >> opendatakit.survey-js directory in order to open up the Application >> Designer. In that console window, do you see any errors? >> >> Clarice >> >> >> On Mon, Jun 23, 2014 at 7:11 AM, Pradnya wrote: >> >>> Here is the excel file, I have updated display.text column and used the >>> new syntax to display the data of the prompts. >>> >>> Pradnya >>> >>> On Wednesday, June 18, 2014 10:22:18 PM UTC+2, clarice larson wrote: >>> >>>> Give the attached file a try. I modified your FDSurvey1.xlsx file to >>>> include a row that defines the "crop_mc_wf_f1_product1" as type text. I >>>> also changed the values in the required column of your survey worksheet to >>>> TRUE since putting evaluates to an error. Finally, I noticed that you are >>>> using ${name_field1} in the display.text column. The new syntax is >>>> {{data.}}. For example, if you wanted to display the data of the >>>> prompt tenure_field1, you would use {{data.tenure_field1}}. >>>> >>>> Clarice >>>> >>>> >>>> On Wed, Jun 18, 2014 at 6:14 AM, Pradnya wrote: >>>> >>>>> Thanks for the updated .js file. I have placed it in the appropriate >>>>> folder. >>>>> >>>>> I have tried both options: i.e. >>>>> 1. Added model.type column in "survey" sheet [Attachment: >>>>> FDSurvey1.xlsx ] >>>>> 2. Added sheet "model" and defined "crop_mc_wf_f1_product1" as text >>>>> [Attachment:FDSurvey1.xlsx ] >>>>> >>>>> Both of the files give the new error which you have already mentioned >>>>> below. >>>>> >>>>> >>>>> >>>>> On Tuesday, June 17, 2014 6:04:03 PM UTC+2, Mitch Sundt wrote: >>>>> >>>>>> Ah, OK. There is an error in the construction of the error message in >>>>>> XLSConverter. The error should read: >>>>>> >>>>>> Field name 'crop_mc_wf_f1_product1' does not have a defined storage >>>>>> type. Clause: 'assign' at row 16 on sheet: survey. Declare the type on the >>>>>> model sheet or in a model.type column. >>>>>> >>>>>> Attached is an updated XLSXConverter.js file that fixes this error >>>>>> message. Place in in the application designer's xlsxconverter directory. >>>>>> >>>>>> >>>>>> >>>>>> On Tue, Jun 17, 2014 at 5:36 AM, Pradnya wrote: >>>>>> >>>>>>> Hi Mitch >>>>>>> Thanks for your response. >>>>>>> >>>>>>> I still get the same error after using javascript subscript [n] >>>>>>> notation. >>>>>>> Please find attached excel file that generates this error >>>>>>> >>>>>>> >>>>>>> On Wednesday, June 11, 2014 11:03:06 PM UTC+2, Mitch Sundt wrote: >>>>>>> >>>>>>>> Sorry for the confusion. >>>>>>>> >>>>>>>> In ODK Survey, multiple-choice fields are represented as *arrays *of >>>>>>>> values directly. >>>>>>>> >>>>>>>> We have defined: >>>>>>>> >>>>>>>> selected( data('fieldname'), 'value') >>>>>>>> >>>>>>>> countSelected( data('fieldname') ) >>>>>>>> >>>>>>>> For the selected-at( data('fieldname'), n ) functionality, you can >>>>>>>> directly use the javascript subscript [n] notation: >>>>>>>> >>>>>>>> (data('fieldname'))[0] -- to get the first selection >>>>>>>> (data('fieldname'))[1] -- to get the second selection >>>>>>>> >>>>>>>> etc. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Wed, Jun 11, 2014 at 12:46 AM, Pradnya wrote: >>>>>>>> >>>>>>>>> Hi Mitch >>>>>>>>> Thanks for your reply. >>>>>>>>> I changed the expression to selected-at(data('crop_ >>>>>>>>> products_mc_wf_f1'),0) >>>>>>>>> and it is present under "calculation" column. I still get the >>>>>>>>> error. I assume that "selected-at" function in not present and I will write >>>>>>>>> custom function to achieve this. >>>>>>>>> >>>>>>>>> >>>>>>>>> Thanks & Regards >>>>>>>>> Pradnya >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On Wednesday, June 4, 2014 6:44:46 PM UTC+2, Mitch Sundt wrote: >>>>>>>>> >>>>>>>>>> In Survey, we have eliminated the ${} syntax. >>>>>>>>>> >>>>>>>>>> Replace any ${fieldname} with data('fieldname') >>>>>>>>>> >>>>>>>>>> Since Survey uses Javascript directly for its calculations, we >>>>>>>>>> needed to have a function ( data(arg) ) that took an argument and returned >>>>>>>>>> the field value. ${} would have required transforming the expression text, >>>>>>>>>> which we wanted to eliminate. >>>>>>>>>> >>>>>>>>>> w.r.t. calculate expressions, these are wrapped by return >>>>>>>>>> statements internally: >>>>>>>>>> >>>>>>>>>> function(...) { >>>>>>>>>> return ( value_from_xlsx_cell ); >>>>>>>>>> } >>>>>>>>>> >>>>>>>>>> If you are familiar with javascript, this opens up the >>>>>>>>>> possibility of doing anything you want (e.g., calling your own custom >>>>>>>>>> functions). >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Wed, Jun 4, 2014 at 2:56 AM, Pradnya wrote: >>>>>>>>>> >>>>>>>>>>> I am working on ODK Survey. >>>>>>>>>>> I have an excel file that is ODK Collect compatible and I am >>>>>>>>>>> converting it to ODK Survey format >>>>>>>>>>> >>>>>>>>>>> In "Calculation" column I have following formula: >>>>>>>>>>> >>>>>>>>>>> if( count-selected(${crop_products_mc_wf_f1}) >= 1, >>>>>>>>>>> selected-at(${crop_products_mc_wf_f1},0),'-') >>>>>>>>>>> >>>>>>>>>>> I removed if condition under "clause" column and kept the assign >>>>>>>>>>> part in calculation. Still I get following error >>>>>>>>>>> ReferenceError: operation is not defined >>>>>>>>>>> >>>>>>>>>>> Can please anyone help to transform this formula or achieve >>>>>>>>>>> equivalent in ODK Survey? >>>>>>>>>>> I have attached excel file for reference. >>>>>>>>>>> >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> Pradnya >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> -- >>>>>>>>>>> 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. >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Mitch Sundt >>>>>>>>>> Software Engineer >>>>>>>>>> University of Washington >>>>>>>>>> mitche...@gmail.com >>>>>>>>>> >>>>>>>>> -- >>>>>>>>> -- >>>>>>>>> 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. >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Mitch Sundt >>>>>>>> Software Engineer >>>>>>>> University of Washington >>>>>>>> mitche...@gmail.com >>>>>>>> >>>>>>> -- >>>>>>> -- >>>>>>> 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. >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Mitch Sundt >>>>>> Software Engineer >>>>>> University of Washington >>>>>> mitche...@gmail.com >>>>>> >>>>> -- >>>>> -- >>>>> 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. >>>>> >>>> >>>> -- >>> -- >>> 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. >>> >> >>

Sorry for the slow reply. This somehow got buried in our inboxes. We were
at a conference/meetings last week.

The framework.xlsx file has an error at row 43.

The "FDSurvey" branch_label is not on a separate row, but is on the row
that contains the "exit section" clause.
If you insert a row below row 43, and move the FDSurvey branch_label to
that row, everything should work.

Mitch

framework.xlsx (13.2 KB)

··· On Tue, Jul 1, 2014 at 1:12 AM, Pradnya wrote:

Please can anyone help me to resolve the issue mentioned in this thread????

Thanks

On Tuesday, June 24, 2014 10:36:36 AM UTC+2, Pradnya wrote:

Here are the answers to your questions,

  1. I am using "ODK ApplicationDesigner v2.0 Alpha-1"
  2. Yes, I have modified the framework.xlsx file to include my new form
    and generated the appropriate formDef.json for these changes. For your
    reference I have attached framework.xlsx and it's corresponding
    formDef.json file.
  3. In the Preview tab of the Application Designer, I can navigate through
    all the example forms (these forms came as a part of Application Designer)
  4. Yes, I opened the console window and ran "grunt" command to start the
    Application Designer and in that window there are no errors generated when
    I click on my form.

Thanks for your help
Pradnya

On Monday, June 23, 2014 7:20:28 PM UTC+2, clarice larson wrote:

Thank you for taking the time to provide the log. The warning in the
ODK_error.txt files does happen on occasion during normal operation and is
not necessarily indicative of an error condition.

I was able to generate a formDef.json from your latest excel file and
navigate through your form using the Application Designer. A few questions
come to mind.

  1. Are you using the development tip of the opendatakit.survey-js repo?
  2. For clarification, have you modified the framework.xlsx file to
    include your new form and generated the appropriate formDef.json for these
    changes?
  3. In the Preview tab of the Application Designer, are you able to
    navigate through the other example forms without any issues?
  4. Presumably you opened a console and typed 'grunt' in your
    opendatakit.survey-js directory in order to open up the Application
    Designer. In that console window, do you see any errors?

Clarice

On Mon, Jun 23, 2014 at 7:11 AM, Pradnya pska...@gmail.com wrote:

Here is the excel file, I have updated display.text column and used the
new syntax to display the data of the prompts.

Pradnya

On Wednesday, June 18, 2014 10:22:18 PM UTC+2, clarice larson wrote:

Give the attached file a try. I modified your FDSurvey1.xlsx file to
include a row that defines the "crop_mc_wf_f1_product1" as type text. I
also changed the values in the required column of your survey worksheet to
TRUE since putting evaluates to an error. Finally, I noticed that you are
using ${name_field1} in the display.text column. The new syntax is
{{data.}}. For example, if you wanted to display the data of the
prompt tenure_field1, you would use {{data.tenure_field1}}.

Clarice

On Wed, Jun 18, 2014 at 6:14 AM, Pradnya pska...@gmail.com wrote:

Thanks for the updated .js file. I have placed it in the appropriate
folder.

I have tried both options: i.e.

  1. Added model.type column in "survey" sheet [Attachment:
    FDSurvey1.xlsx ]
  2. Added sheet "model" and defined "crop_mc_wf_f1_product1" as text
    [Attachment:FDSurvey1.xlsx ]

Both of the files give the new error which you have already mentioned
below.

On Tuesday, June 17, 2014 6:04:03 PM UTC+2, Mitch Sundt wrote:

Ah, OK. There is an error in the construction of the error message
in XLSConverter. The error should read:

Field name 'crop_mc_wf_f1_product1' does not have a defined storage
type. Clause: 'assign' at row 16 on sheet: survey. Declare the type on the
model sheet or in a model.type column.

Attached is an updated XLSXConverter.js file that fixes this error
message. Place in in the application designer's xlsxconverter directory.

On Tue, Jun 17, 2014 at 5:36 AM, Pradnya pska...@gmail.com wrote:

Hi Mitch
Thanks for your response.

I still get the same error after using javascript subscript [n]
notation.
Please find attached excel file that generates this error

On Wednesday, June 11, 2014 11:03:06 PM UTC+2, Mitch Sundt wrote:

Sorry for the confusion.

In ODK Survey, multiple-choice fields are represented as *arrays *of
values directly.

We have defined:

selected( data('fieldname'), 'value')

countSelected( data('fieldname') )

For the selected-at( data('fieldname'), n ) functionality, you can
directly use the javascript subscript [n] notation:

(data('fieldname'))[0] -- to get the first selection
(data('fieldname'))[1] -- to get the second selection

etc.

On Wed, Jun 11, 2014 at 12:46 AM, Pradnya pska...@gmail.com wrote:

Hi Mitch
Thanks for your reply.
I changed the expression to selected-at(data('crop_
products_mc_wf_f1'),0)
and it is present under "calculation" column. I still get the
error. I assume that "selected-at" function in not present and I will write
custom function to achieve this.

Thanks & Regards
Pradnya

On Wednesday, June 4, 2014 6:44:46 PM UTC+2, Mitch Sundt wrote:

In Survey, we have eliminated the ${} syntax.

Replace any ${fieldname} with data('fieldname')

Since Survey uses Javascript directly for its calculations, we
needed to have a function ( data(arg) ) that took an argument and returned
the field value. ${} would have required transforming the expression text,
which we wanted to eliminate.

w.r.t. calculate expressions, these are wrapped by return
statements internally:

function(...) {
return ( value_from_xlsx_cell );
}

If you are familiar with javascript, this opens up the
possibility of doing anything you want (e.g., calling your own custom
functions).

On Wed, Jun 4, 2014 at 2:56 AM, Pradnya pska...@gmail.com wrote:

I am working on ODK Survey.
I have an excel file that is ODK Collect compatible and I am
converting it to ODK Survey format

In "Calculation" column I have following formula:

if( count-selected(${crop_products_mc_wf_f1}) >= 1,
selected-at(${crop_products_mc_wf_f1},0),'-')

I removed if condition under "clause" column and kept the
assign part in calculation. Still I get following error
ReferenceError: operation is not defined

Can please anyone help to transform this formula or achieve
equivalent in ODK Survey?
I have attached excel file for reference.

Thanks & Regards
Pradnya

--

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.

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

--

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.

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

--

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.

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

--

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.

--
--
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.

--
--
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

I also emailed a response to you directly yesterday with a new
framework.xlsx file and formDef.json file. The email may have gone to your
spam folder.

Clarice

··· On Tue, Jul 1, 2014 at 9:09 AM, Mitch Sundt wrote:

Sorry for the slow reply. This somehow got buried in our inboxes. We were
at a conference/meetings last week.

The framework.xlsx file has an error at row 43.

The "FDSurvey" branch_label is not on a separate row, but is on the row
that contains the "exit section" clause.
If you insert a row below row 43, and move the FDSurvey branch_label to
that row, everything should work.

Mitch

On Tue, Jul 1, 2014 at 1:12 AM, Pradnya pskadam23@gmail.com wrote:

Please can anyone help me to resolve the issue mentioned in this
thread????

Thanks

On Tuesday, June 24, 2014 10:36:36 AM UTC+2, Pradnya wrote:

Here are the answers to your questions,

  1. I am using "ODK ApplicationDesigner v2.0 Alpha-1"
  2. Yes, I have modified the framework.xlsx file to include my new form
    and generated the appropriate formDef.json for these changes. For your
    reference I have attached framework.xlsx and it's corresponding
    formDef.json file.
  3. In the Preview tab of the Application Designer, I can navigate
    through all the example forms (these forms came as a part of Application
    Designer)
  4. Yes, I opened the console window and ran "grunt" command to start the
    Application Designer and in that window there are no errors generated when
    I click on my form.

Thanks for your help
Pradnya

On Monday, June 23, 2014 7:20:28 PM UTC+2, clarice larson wrote:

Thank you for taking the time to provide the log. The warning in the
ODK_error.txt files does happen on occasion during normal operation and is
not necessarily indicative of an error condition.

I was able to generate a formDef.json from your latest excel file and
navigate through your form using the Application Designer. A few questions
come to mind.

  1. Are you using the development tip of the opendatakit.survey-js repo?
  2. For clarification, have you modified the framework.xlsx file to
    include your new form and generated the appropriate formDef.json for these
    changes?
  3. In the Preview tab of the Application Designer, are you able to
    navigate through the other example forms without any issues?
  4. Presumably you opened a console and typed 'grunt' in your
    opendatakit.survey-js directory in order to open up the Application
    Designer. In that console window, do you see any errors?

Clarice

On Mon, Jun 23, 2014 at 7:11 AM, Pradnya pska...@gmail.com wrote:

Here is the excel file, I have updated display.text column and used
the new syntax to display the data of the prompts.

Pradnya

On Wednesday, June 18, 2014 10:22:18 PM UTC+2, clarice larson wrote:

Give the attached file a try. I modified your FDSurvey1.xlsx file to
include a row that defines the "crop_mc_wf_f1_product1" as type text. I
also changed the values in the required column of your survey worksheet to
TRUE since putting evaluates to an error. Finally, I noticed that you are
using ${name_field1} in the display.text column. The new syntax is
{{data.}}. For example, if you wanted to display the data of the
prompt tenure_field1, you would use {{data.tenure_field1}}.

Clarice

On Wed, Jun 18, 2014 at 6:14 AM, Pradnya pska...@gmail.com wrote:

Thanks for the updated .js file. I have placed it in the
appropriate folder.

I have tried both options: i.e.

  1. Added model.type column in "survey" sheet [Attachment:
    FDSurvey1.xlsx ]
  2. Added sheet "model" and defined "crop_mc_wf_f1_product1" as text
    [Attachment:FDSurvey1.xlsx ]

Both of the files give the new error which you have already
mentioned below.

On Tuesday, June 17, 2014 6:04:03 PM UTC+2, Mitch Sundt wrote:

Ah, OK. There is an error in the construction of the error message
in XLSConverter. The error should read:

Field name 'crop_mc_wf_f1_product1' does not have a defined storage
type. Clause: 'assign' at row 16 on sheet: survey. Declare the type on the
model sheet or in a model.type column.

Attached is an updated XLSXConverter.js file that fixes this error
message. Place in in the application designer's xlsxconverter directory.

On Tue, Jun 17, 2014 at 5:36 AM, Pradnya pska...@gmail.com wrote:

Hi Mitch
Thanks for your response.

I still get the same error after using javascript subscript [n]
notation.
Please find attached excel file that generates this error

On Wednesday, June 11, 2014 11:03:06 PM UTC+2, Mitch Sundt wrote:

Sorry for the confusion.

In ODK Survey, multiple-choice fields are represented as *arrays
*of values directly.

We have defined:

selected( data('fieldname'), 'value')

countSelected( data('fieldname') )

For the selected-at( data('fieldname'), n ) functionality, you
can directly use the javascript subscript [n] notation:

(data('fieldname'))[0] -- to get the first selection
(data('fieldname'))[1] -- to get the second selection

etc.

On Wed, Jun 11, 2014 at 12:46 AM, Pradnya pska...@gmail.com wrote:

Hi Mitch
Thanks for your reply.
I changed the expression to selected-at(data('crop_
products_mc_wf_f1'),0)
and it is present under "calculation" column. I still get the
error. I assume that "selected-at" function in not present and I will write
custom function to achieve this.

Thanks & Regards
Pradnya

On Wednesday, June 4, 2014 6:44:46 PM UTC+2, Mitch Sundt wrote:

In Survey, we have eliminated the ${} syntax.

Replace any ${fieldname} with data('fieldname')

Since Survey uses Javascript directly for its calculations, we
needed to have a function ( data(arg) ) that took an argument and returned
the field value. ${} would have required transforming the expression text,
which we wanted to eliminate.

w.r.t. calculate expressions, these are wrapped by return
statements internally:

function(...) {
return ( value_from_xlsx_cell );
}

If you are familiar with javascript, this opens up the
possibility of doing anything you want (e.g., calling your own custom
functions).

On Wed, Jun 4, 2014 at 2:56 AM, Pradnya pska...@gmail.com wrote:

I am working on ODK Survey.
I have an excel file that is ODK Collect compatible and I am
converting it to ODK Survey format

In "Calculation" column I have following formula:

if( count-selected(${crop_products_mc_wf_f1}) >= 1,
selected-at(${crop_products_mc_wf_f1},0),'-')

I removed if condition under "clause" column and kept the
assign part in calculation. Still I get following error
ReferenceError: operation is not defined

Can please anyone help to transform this formula or achieve
equivalent in ODK Survey?
I have attached excel file for reference.

Thanks & Regards
Pradnya

--

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.

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

--

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.

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

--

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.

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

--

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.

--
--
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.

--
--
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.

Thanks for your response. The issue is sorted and I can see my form.
Clarice Larson also pointed out at the same error and with the corrected
framework.xlsx file the issue is resolved

Many thanks for your help.

Pradnya

··· On Tuesday, July 1, 2014 6:10:00 PM UTC+2, Mitch Sundt wrote: > > Sorry for the slow reply. This somehow got buried in our inboxes. We were > at a conference/meetings last week. > > The framework.xlsx file has an error at row 43. > > The "FDSurvey" branch_label is not on a separate row, but is on the row > that contains the "exit section" clause. > If you insert a row below row 43, and move the FDSurvey branch_label to > that row, everything should work. > > Mitch > > > > On Tue, Jul 1, 2014 at 1:12 AM, Pradnya <pska...@gmail.com > wrote: > >> Please can anyone help me to resolve the issue mentioned in this >> thread???? >> >> Thanks >> >> >> On Tuesday, June 24, 2014 10:36:36 AM UTC+2, Pradnya wrote: >>> >>> Here are the answers to your questions, >>> >>> 1. I am using "ODK ApplicationDesigner v2.0 Alpha-1" >>> 2. Yes, I have modified the framework.xlsx file to include my new form >>> and generated the appropriate formDef.json for these changes. For your >>> reference I have attached framework.xlsx and it's corresponding >>> formDef.json file. >>> 3. In the Preview tab of the Application Designer, I can navigate >>> through all the example forms (these forms came as a part of Application >>> Designer) >>> 4. Yes, I opened the console window and ran "grunt" command to start the >>> Application Designer and in that window there are no errors generated when >>> I click on my form. >>> >>> Thanks for your help >>> Pradnya >>> >>> >>> On Monday, June 23, 2014 7:20:28 PM UTC+2, clarice larson wrote: >>>> >>>> Thank you for taking the time to provide the log. The warning in the >>>> ODK_error.txt files does happen on occasion during normal operation and is >>>> not necessarily indicative of an error condition. >>>> >>>> I was able to generate a formDef.json from your latest excel file and >>>> navigate through your form using the Application Designer. A few questions >>>> come to mind. >>>> >>>> 1. Are you using the development tip of the opendatakit.survey-js repo? >>>> 2. For clarification, have you modified the framework.xlsx file to >>>> include your new form and generated the appropriate formDef.json for these >>>> changes? >>>> 3. In the Preview tab of the Application Designer, are you able to >>>> navigate through the other example forms without any issues? >>>> 4. Presumably you opened a console and typed 'grunt' in your >>>> opendatakit.survey-js directory in order to open up the Application >>>> Designer. In that console window, do you see any errors? >>>> >>>> Clarice >>>> >>>> >>>> On Mon, Jun 23, 2014 at 7:11 AM, Pradnya wrote: >>>> >>>>> Here is the excel file, I have updated display.text column and used >>>>> the new syntax to display the data of the prompts. >>>>> >>>>> Pradnya >>>>> >>>>> On Wednesday, June 18, 2014 10:22:18 PM UTC+2, clarice larson wrote: >>>>> >>>>>> Give the attached file a try. I modified your FDSurvey1.xlsx file to >>>>>> include a row that defines the "crop_mc_wf_f1_product1" as type text. I >>>>>> also changed the values in the required column of your survey worksheet to >>>>>> TRUE since putting evaluates to an error. Finally, I noticed that you are >>>>>> using ${name_field1} in the display.text column. The new syntax is >>>>>> {{data.}}. For example, if you wanted to display the data of the >>>>>> prompt tenure_field1, you would use {{data.tenure_field1}}. >>>>>> >>>>>> Clarice >>>>>> >>>>>> >>>>>> On Wed, Jun 18, 2014 at 6:14 AM, Pradnya wrote: >>>>>> >>>>>>> Thanks for the updated .js file. I have placed it in the >>>>>>> appropriate folder. >>>>>>> >>>>>>> I have tried both options: i.e. >>>>>>> 1. Added model.type column in "survey" sheet [Attachment: >>>>>>> FDSurvey1.xlsx ] >>>>>>> 2. Added sheet "model" and defined "crop_mc_wf_f1_product1" as text >>>>>>> [Attachment:FDSurvey1.xlsx ] >>>>>>> >>>>>>> Both of the files give the new error which you have already >>>>>>> mentioned below. >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Tuesday, June 17, 2014 6:04:03 PM UTC+2, Mitch Sundt wrote: >>>>>>> >>>>>>>> Ah, OK. There is an error in the construction of the error message >>>>>>>> in XLSConverter. The error should read: >>>>>>>> >>>>>>>> Field name 'crop_mc_wf_f1_product1' does not have a defined storage >>>>>>>> type. Clause: 'assign' at row 16 on sheet: survey. Declare the type on the >>>>>>>> model sheet or in a model.type column. >>>>>>>> >>>>>>>> Attached is an updated XLSXConverter.js file that fixes this error >>>>>>>> message. Place in in the application designer's xlsxconverter directory. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Tue, Jun 17, 2014 at 5:36 AM, Pradnya wrote: >>>>>>>> >>>>>>>>> Hi Mitch >>>>>>>>> Thanks for your response. >>>>>>>>> >>>>>>>>> I still get the same error after using javascript subscript [n] >>>>>>>>> notation. >>>>>>>>> Please find attached excel file that generates this error >>>>>>>>> >>>>>>>>> >>>>>>>>> On Wednesday, June 11, 2014 11:03:06 PM UTC+2, Mitch Sundt wrote: >>>>>>>>> >>>>>>>>>> Sorry for the confusion. >>>>>>>>>> >>>>>>>>>> In ODK Survey, multiple-choice fields are represented as *arrays >>>>>>>>>> *of values directly. >>>>>>>>>> >>>>>>>>>> We have defined: >>>>>>>>>> >>>>>>>>>> selected( data('fieldname'), 'value') >>>>>>>>>> >>>>>>>>>> countSelected( data('fieldname') ) >>>>>>>>>> >>>>>>>>>> For the selected-at( data('fieldname'), n ) functionality, you >>>>>>>>>> can directly use the javascript subscript [n] notation: >>>>>>>>>> >>>>>>>>>> (data('fieldname'))[0] -- to get the first selection >>>>>>>>>> (data('fieldname'))[1] -- to get the second selection >>>>>>>>>> >>>>>>>>>> etc. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Wed, Jun 11, 2014 at 12:46 AM, Pradnya wrote: >>>>>>>>>> >>>>>>>>>>> Hi Mitch >>>>>>>>>>> Thanks for your reply. >>>>>>>>>>> I changed the expression to selected-at(data('crop_ >>>>>>>>>>> products_mc_wf_f1'),0) >>>>>>>>>>> and it is present under "calculation" column. I still get the >>>>>>>>>>> error. I assume that "selected-at" function in not present and I will write >>>>>>>>>>> custom function to achieve this. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Thanks & Regards >>>>>>>>>>> Pradnya >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Wednesday, June 4, 2014 6:44:46 PM UTC+2, Mitch Sundt wrote: >>>>>>>>>>> >>>>>>>>>>>> In Survey, we have eliminated the ${} syntax. >>>>>>>>>>>> >>>>>>>>>>>> Replace any ${fieldname} with data('fieldname') >>>>>>>>>>>> >>>>>>>>>>>> Since Survey uses Javascript directly for its calculations, we >>>>>>>>>>>> needed to have a function ( data(arg) ) that took an argument and returned >>>>>>>>>>>> the field value. ${} would have required transforming the expression text, >>>>>>>>>>>> which we wanted to eliminate. >>>>>>>>>>>> >>>>>>>>>>>> w.r.t. calculate expressions, these are wrapped by return >>>>>>>>>>>> statements internally: >>>>>>>>>>>> >>>>>>>>>>>> function(...) { >>>>>>>>>>>> return ( value_from_xlsx_cell ); >>>>>>>>>>>> } >>>>>>>>>>>> >>>>>>>>>>>> If you are familiar with javascript, this opens up the >>>>>>>>>>>> possibility of doing anything you want (e.g., calling your own custom >>>>>>>>>>>> functions). >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Wed, Jun 4, 2014 at 2:56 AM, Pradnya wrote: >>>>>>>>>>>> >>>>>>>>>>>>> I am working on ODK Survey. >>>>>>>>>>>>> I have an excel file that is ODK Collect compatible and I am >>>>>>>>>>>>> converting it to ODK Survey format >>>>>>>>>>>>> >>>>>>>>>>>>> In "Calculation" column I have following formula: >>>>>>>>>>>>> >>>>>>>>>>>>> if( count-selected(${crop_products_mc_wf_f1}) >= 1, >>>>>>>>>>>>> selected-at(${crop_products_mc_wf_f1},0),'-') >>>>>>>>>>>>> >>>>>>>>>>>>> I removed if condition under "clause" column and kept the >>>>>>>>>>>>> assign part in calculation. Still I get following error >>>>>>>>>>>>> ReferenceError: operation is not defined >>>>>>>>>>>>> >>>>>>>>>>>>> Can please anyone help to transform this formula or achieve >>>>>>>>>>>>> equivalent in ODK Survey? >>>>>>>>>>>>> I have attached excel file for reference. >>>>>>>>>>>>> >>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>> Pradnya >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> -- >>>>>>>>>>>>> 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. >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Mitch Sundt >>>>>>>>>>>> Software Engineer >>>>>>>>>>>> University of Washington >>>>>>>>>>>> mitche...@gmail.com >>>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> -- >>>>>>>>>>> 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. >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Mitch Sundt >>>>>>>>>> Software Engineer >>>>>>>>>> University of Washington >>>>>>>>>> mitche...@gmail.com >>>>>>>>>> >>>>>>>>> -- >>>>>>>>> -- >>>>>>>>> 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. >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Mitch Sundt >>>>>>>> Software Engineer >>>>>>>> University of Washington >>>>>>>> mitche...@gmail.com >>>>>>>> >>>>>>> -- >>>>>>> -- >>>>>>> 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. >>>>>>> >>>>>> >>>>>> -- >>>>> -- >>>>> 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. >>>>> >>>> >>>> -- >> -- >> 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. >> > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com >

Hi Clarice
Many thanks for your email and files.I have replied to your email. Files
provided by you works and now I can see my form

Pradnya

··· On Tuesday, July 1, 2014 6:56:42 PM UTC+2, clarice larson wrote: > > I also emailed a response to you directly yesterday with a new > framework.xlsx file and formDef.json file. The email may have gone to your > spam folder. > > Clarice > > > On Tue, Jul 1, 2014 at 9:09 AM, Mitch Sundt <mitche...@gmail.com > wrote: > >> Sorry for the slow reply. This somehow got buried in our inboxes. We were >> at a conference/meetings last week. >> >> The framework.xlsx file has an error at row 43. >> >> The "FDSurvey" branch_label is not on a separate row, but is on the row >> that contains the "exit section" clause. >> If you insert a row below row 43, and move the FDSurvey branch_label to >> that row, everything should work. >> >> Mitch >> >> >> >> On Tue, Jul 1, 2014 at 1:12 AM, Pradnya <pska...@gmail.com > wrote: >> >>> Please can anyone help me to resolve the issue mentioned in this >>> thread???? >>> >>> Thanks >>> >>> >>> On Tuesday, June 24, 2014 10:36:36 AM UTC+2, Pradnya wrote: >>>> >>>> Here are the answers to your questions, >>>> >>>> 1. I am using "ODK ApplicationDesigner v2.0 Alpha-1" >>>> 2. Yes, I have modified the framework.xlsx file to include my new form >>>> and generated the appropriate formDef.json for these changes. For your >>>> reference I have attached framework.xlsx and it's corresponding >>>> formDef.json file. >>>> 3. In the Preview tab of the Application Designer, I can navigate >>>> through all the example forms (these forms came as a part of Application >>>> Designer) >>>> 4. Yes, I opened the console window and ran "grunt" command to start >>>> the Application Designer and in that window there are no errors generated >>>> when I click on my form. >>>> >>>> Thanks for your help >>>> Pradnya >>>> >>>> >>>> On Monday, June 23, 2014 7:20:28 PM UTC+2, clarice larson wrote: >>>>> >>>>> Thank you for taking the time to provide the log. The warning in the >>>>> ODK_error.txt files does happen on occasion during normal operation and is >>>>> not necessarily indicative of an error condition. >>>>> >>>>> I was able to generate a formDef.json from your latest excel file and >>>>> navigate through your form using the Application Designer. A few questions >>>>> come to mind. >>>>> >>>>> 1. Are you using the development tip of the opendatakit.survey-js >>>>> repo? >>>>> 2. For clarification, have you modified the framework.xlsx file to >>>>> include your new form and generated the appropriate formDef.json for these >>>>> changes? >>>>> 3. In the Preview tab of the Application Designer, are you able to >>>>> navigate through the other example forms without any issues? >>>>> 4. Presumably you opened a console and typed 'grunt' in your >>>>> opendatakit.survey-js directory in order to open up the Application >>>>> Designer. In that console window, do you see any errors? >>>>> >>>>> Clarice >>>>> >>>>> >>>>> On Mon, Jun 23, 2014 at 7:11 AM, Pradnya wrote: >>>>> >>>>>> Here is the excel file, I have updated display.text column and used >>>>>> the new syntax to display the data of the prompts. >>>>>> >>>>>> Pradnya >>>>>> >>>>>> On Wednesday, June 18, 2014 10:22:18 PM UTC+2, clarice larson wrote: >>>>>> >>>>>>> Give the attached file a try. I modified your FDSurvey1.xlsx file >>>>>>> to include a row that defines the "crop_mc_wf_f1_product1" as type text. I >>>>>>> also changed the values in the required column of your survey worksheet to >>>>>>> TRUE since putting evaluates to an error. Finally, I noticed that you are >>>>>>> using ${name_field1} in the display.text column. The new syntax is >>>>>>> {{data.}}. For example, if you wanted to display the data of the >>>>>>> prompt tenure_field1, you would use {{data.tenure_field1}}. >>>>>>> >>>>>>> Clarice >>>>>>> >>>>>>> >>>>>>> On Wed, Jun 18, 2014 at 6:14 AM, Pradnya wrote: >>>>>>> >>>>>>>> Thanks for the updated .js file. I have placed it in the >>>>>>>> appropriate folder. >>>>>>>> >>>>>>>> I have tried both options: i.e. >>>>>>>> 1. Added model.type column in "survey" sheet [Attachment: >>>>>>>> FDSurvey1.xlsx ] >>>>>>>> 2. Added sheet "model" and defined "crop_mc_wf_f1_product1" as text >>>>>>>> [Attachment:FDSurvey1.xlsx ] >>>>>>>> >>>>>>>> Both of the files give the new error which you have already >>>>>>>> mentioned below. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Tuesday, June 17, 2014 6:04:03 PM UTC+2, Mitch Sundt wrote: >>>>>>>> >>>>>>>>> Ah, OK. There is an error in the construction of the error message >>>>>>>>> in XLSConverter. The error should read: >>>>>>>>> >>>>>>>>> Field name 'crop_mc_wf_f1_product1' does not have a defined >>>>>>>>> storage type. Clause: 'assign' at row 16 on sheet: survey. Declare the type >>>>>>>>> on the model sheet or in a model.type column. >>>>>>>>> >>>>>>>>> Attached is an updated XLSXConverter.js file that fixes this error >>>>>>>>> message. Place in in the application designer's xlsxconverter directory. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On Tue, Jun 17, 2014 at 5:36 AM, Pradnya wrote: >>>>>>>>> >>>>>>>>>> Hi Mitch >>>>>>>>>> Thanks for your response. >>>>>>>>>> >>>>>>>>>> I still get the same error after using javascript subscript [n] >>>>>>>>>> notation. >>>>>>>>>> Please find attached excel file that generates this error >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Wednesday, June 11, 2014 11:03:06 PM UTC+2, Mitch Sundt wrote: >>>>>>>>>> >>>>>>>>>>> Sorry for the confusion. >>>>>>>>>>> >>>>>>>>>>> In ODK Survey, multiple-choice fields are represented as *arrays >>>>>>>>>>> *of values directly. >>>>>>>>>>> >>>>>>>>>>> We have defined: >>>>>>>>>>> >>>>>>>>>>> selected( data('fieldname'), 'value') >>>>>>>>>>> >>>>>>>>>>> countSelected( data('fieldname') ) >>>>>>>>>>> >>>>>>>>>>> For the selected-at( data('fieldname'), n ) functionality, you >>>>>>>>>>> can directly use the javascript subscript [n] notation: >>>>>>>>>>> >>>>>>>>>>> (data('fieldname'))[0] -- to get the first selection >>>>>>>>>>> (data('fieldname'))[1] -- to get the second selection >>>>>>>>>>> >>>>>>>>>>> etc. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Wed, Jun 11, 2014 at 12:46 AM, Pradnya wrote: >>>>>>>>>>> >>>>>>>>>>>> Hi Mitch >>>>>>>>>>>> Thanks for your reply. >>>>>>>>>>>> I changed the expression to selected-at(data('crop_ >>>>>>>>>>>> products_mc_wf_f1'),0) >>>>>>>>>>>> and it is present under "calculation" column. I still get the >>>>>>>>>>>> error. I assume that "selected-at" function in not present and I will write >>>>>>>>>>>> custom function to achieve this. >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>> Pradnya >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Wednesday, June 4, 2014 6:44:46 PM UTC+2, Mitch Sundt wrote: >>>>>>>>>>>> >>>>>>>>>>>>> In Survey, we have eliminated the ${} syntax. >>>>>>>>>>>>> >>>>>>>>>>>>> Replace any ${fieldname} with data('fieldname') >>>>>>>>>>>>> >>>>>>>>>>>>> Since Survey uses Javascript directly for its calculations, we >>>>>>>>>>>>> needed to have a function ( data(arg) ) that took an argument and returned >>>>>>>>>>>>> the field value. ${} would have required transforming the expression text, >>>>>>>>>>>>> which we wanted to eliminate. >>>>>>>>>>>>> >>>>>>>>>>>>> w.r.t. calculate expressions, these are wrapped by return >>>>>>>>>>>>> statements internally: >>>>>>>>>>>>> >>>>>>>>>>>>> function(...) { >>>>>>>>>>>>> return ( value_from_xlsx_cell ); >>>>>>>>>>>>> } >>>>>>>>>>>>> >>>>>>>>>>>>> If you are familiar with javascript, this opens up the >>>>>>>>>>>>> possibility of doing anything you want (e.g., calling your own custom >>>>>>>>>>>>> functions). >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On Wed, Jun 4, 2014 at 2:56 AM, Pradnya wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> I am working on ODK Survey. >>>>>>>>>>>>>> I have an excel file that is ODK Collect compatible and I am >>>>>>>>>>>>>> converting it to ODK Survey format >>>>>>>>>>>>>> >>>>>>>>>>>>>> In "Calculation" column I have following formula: >>>>>>>>>>>>>> >>>>>>>>>>>>>> if( count-selected(${crop_products_mc_wf_f1}) >= 1, >>>>>>>>>>>>>> selected-at(${crop_products_mc_wf_f1},0),'-') >>>>>>>>>>>>>> >>>>>>>>>>>>>> I removed if condition under "clause" column and kept the >>>>>>>>>>>>>> assign part in calculation. Still I get following error >>>>>>>>>>>>>> ReferenceError: operation is not defined >>>>>>>>>>>>>> >>>>>>>>>>>>>> Can please anyone help to transform this formula or achieve >>>>>>>>>>>>>> equivalent in ODK Survey? >>>>>>>>>>>>>> I have attached excel file for reference. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Thanks & Regards >>>>>>>>>>>>>> Pradnya >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> 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. >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> Mitch Sundt >>>>>>>>>>>>> Software Engineer >>>>>>>>>>>>> University of Washington >>>>>>>>>>>>> mitche...@gmail.com >>>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> -- >>>>>>>>>>>> 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. >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> Mitch Sundt >>>>>>>>>>> Software Engineer >>>>>>>>>>> University of Washington >>>>>>>>>>> mitche...@gmail.com >>>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> -- >>>>>>>>>> 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. >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Mitch Sundt >>>>>>>>> Software Engineer >>>>>>>>> University of Washington >>>>>>>>> mitche...@gmail.com >>>>>>>>> >>>>>>>> -- >>>>>>>> -- >>>>>>>> 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. >>>>>>>> >>>>>>> >>>>>>> -- >>>>>> -- >>>>>> 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. >>>>>> >>>>> >>>>> -- >>> -- >>> 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. >>> >> >> >> >> -- >> Mitch Sundt >> Software Engineer >> University of Washington >> mitche...@gmail.com >> >> -- >> -- >> 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. >> > >