Hi there,
Hoping someone can help - working in Excel.
Wondering what value I must put in a field if I want to divide? I would
like to substitute the (+) for a divide in the following equation > *
${mileage}+${age}*
Thank you
Hi there,
Hoping someone can help - working in Excel.
Wondering what value I must put in a field if I want to divide? I would
like to substitute the (+) for a divide in the following equation > *
${mileage}+${age}*
Thank you
Imobi,
You can use "div" for divide. See the full list of operators here:
http://www.w3schools.com/xpath/xpath_operators.asp (and functions here:
https://bitbucket.org/javarosa/javarosa/wiki/xform-jr-compat#!paths-and-expressions
).
Best,
Chris
Hi there,
Hoping someone can help - working in Excel.
Wondering what value I must put in a field if I want to divide? I would
like to substitute the (+) for a divide in the following equation > *
${mileage}+${age}*Thank you
--
Post: opendatakit@googlegroups.com <javascript:_e({}, 'cvml',
'opendatakit@googlegroups.com');>
Unsubscribe: opendatakit+unsubscribe@googlegroups.com <javascript:_e({},
'cvml', 'opendatakit%2Bunsubscribe@googlegroups.com');>
Options: http://groups.google.com/group/opendatakit?hl=en
Hi Imobi,
For division you would use div. For example: ${mileage} div ${age}
Regards,
-Nathan
Thanks Chris
Imobi,
You can use "div" for divide. See the full list of operators here:
http://www.w3schools.com/xpath/xpath_operators.asp (and functions here:
https://bitbucket.org/javarosa/javarosa/wiki/xform-jr-compat#!paths-and-expressions
).Best,
Chris
On Monday, November 26, 2012, Imobi wrote:
Hi there,
Hoping someone can help - working in Excel.
Wondering what value I must put in a field if I want to divide? I would
like to substitute the (+) for a divide in the following equation > *
${mileage}+${age}*Thank you
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
--
Larisa Liepins
O. 021 762 1661
C. 074 284 1688
Hi again,
It seems as though the calculation still does not work. Do you know why?
Please find attached my excel form; see J49
Thank you!
inspect_a_car.xls (32.5 KB)
Division by integers yields an integer result (truncated, not rounded).
From your form it looks like mileage could be a decimal which would then
cause the calculation to yield a decimal result. Does this explain the
problem you are having?
Hi again,
It seems as though the calculation still does not work. Do you know why?
Please find attached my excel form; see J49Thank you!
On Tuesday, November 27, 2012 8:30:05 AM UTC+2, Imobi wrote:
Thanks Chris
On Mon, Nov 26, 2012 at 2:56 PM, Christopher Robert < Christopher_Robert@hks.**harvard.edu Christopher_Robert@hks.harvard.edu wrote:
Imobi,
You can use "div" for divide. See the full list of operators here:
http://www.w3schools.com/xpath/xpath_operators.asphttp://www.w3schools.com/xpath/xpath_operators.asp(and functions here:
https://bitbucket.org/**javarosa/javarosa/wiki/xform-
jr-compat#!paths-and-**expressionshttps://bitbucket.org/javarosa/javarosa/wiki/xform-jr-compat#!paths-and-expressions
).Best,
Chris
On Monday, November 26, 2012, Imobi wrote:
Hi there,
Hoping someone can help - working in Excel.
Wondering what value I must put in a field if I want to divide? I would
like to substitute the (+) for a divide in the following equation > *
${mileage}+${age}*Thank you
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@**googlegroups.com
Options: http://groups.google.com/**group/opendatakit?hl=enhttp://groups.google.com/group/opendatakit?hl=en--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@**googlegroups.comopendatakit%2Bunsubscribe@googlegroups.com
Options: http://groups.google.com/**group/opendatakit?hl=enhttp://groups.google.com/group/opendatakit?hl=en--
Larisa Liepins
O. 021 762 1661
C. 074 284 1688--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
Hi,
We are not getting any result at all, a decimal would be ok however
Thanks
Division by integers yields an integer result (truncated, not rounded).
From your form it looks like mileage could be a decimal which would then
cause the calculation to yield a decimal result. Does this explain the
problem you are having?On Mon, Dec 3, 2012 at 10:58 PM, Imobi larisa@imobi.co.za wrote:
Hi again,
It seems as though the calculation still does not work. Do you know why?
Please find attached my excel form; see J49Thank you!
On Tuesday, November 27, 2012 8:30:05 AM UTC+2, Imobi wrote:
Thanks Chris
On Mon, Nov 26, 2012 at 2:56 PM, Christopher Robert < Christopher_Robert@hks.**harvard.eduChristopher_Robert@hks.harvard.edu wrote:
Imobi,
You can use "div" for divide. See the full list of operators here:
http://www.w3schools.com/xpath/xpath_operators.asphttp://www.w3schools.com/xpath/xpath_operators.asp(and functions here:
https://bitbucket.org/**javarosa/javarosa/wiki/xform-
jr-compat#!paths-and-**expressionshttps://bitbucket.org/javarosa/javarosa/wiki/xform-jr-compat#!paths-and-expressions
).Best,
Chris
On Monday, November 26, 2012, Imobi wrote:
Hi there,
Hoping someone can help - working in Excel.
Wondering what value I must put in a field if I want to divide? I
would like to substitute the (+) for a divide in the following equation >
${mileage}+${age}Thank you
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@**googlegroups.com
Options: http://groups.google.com/**group/opendatakit?hl=enhttp://groups.google.com/group/opendatakit?hl=en--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@**googlegroups.comopendatakit%2Bunsubscribe@googlegroups.com
Options: http://groups.google.com/**group/opendatakit?hl=enhttp://groups.google.com/group/opendatakit?hl=en--
Larisa Liepins
O. 021 762 1661
C. 074 284 1688--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
--
Larisa Liepins
O. 021 762 1661
C. 074 284 1688
Sorry I can't check this out quickly but you might try putting spaces
around the operator "div" in your expression.
I've never see it all without spaces as you have it.
Hi,
We are not getting any result at all, a decimal would be ok however
Thanks
On Tue, Dec 4, 2012 at 9:25 AM, Gaetano Borriello < gaetano@cs.washington.edu> wrote:
Division by integers yields an integer result (truncated, not rounded).
From your form it looks like mileage could be a decimal which would then
cause the calculation to yield a decimal result. Does this explain the
problem you are having?On Mon, Dec 3, 2012 at 10:58 PM, Imobi larisa@imobi.co.za wrote:
Hi again,
It seems as though the calculation still does not work. Do you know why?
Please find attached my excel form; see J49Thank you!
On Tuesday, November 27, 2012 8:30:05 AM UTC+2, Imobi wrote:
Thanks Chris
On Mon, Nov 26, 2012 at 2:56 PM, Christopher Robert < Christopher_Robert@hks.**harvard.eduChristopher_Robert@hks.harvard.edu wrote:
Imobi,
You can use "div" for divide. See the full list of operators here:
http://www.w3schools.com/xpath/xpath_operators.asphttp://www.w3schools.com/xpath/xpath_operators.asp(and functions here:
https://bitbucket.org/**javarosa/javarosa/wiki/xform-
jr-compat#!paths-and-**expressionshttps://bitbucket.org/javarosa/javarosa/wiki/xform-jr-compat#!paths-and-expressions
).Best,
Chris
On Monday, November 26, 2012, Imobi wrote:
Hi there,
Hoping someone can help - working in Excel.
Wondering what value I must put in a field if I want to divide? I
would like to substitute the (+) for a divide in the following equation >
${mileage}+${age}Thank you
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@**googlegroups.com
Options: http://groups.google.com/**group/opendatakit?hl=enhttp://groups.google.com/group/opendatakit?hl=en--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@**googlegroups.comopendatakit%2Bunsubscribe@googlegroups.com
Options: http://groups.google.com/**group/opendatakit?hl=enhttp://groups.google.com/group/opendatakit?hl=en--
Larisa Liepins
O. 021 762 1661
C. 074 284 1688--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en--
Larisa Liepins
O. 021 762 1661
C. 074 284 1688--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
Hi
I just tried adding the spaces in however than I am unable to convert it to
XLS. It gives the following error:
(without the spacing I do not receive an error)
Error: ODK Validate Errors: Invalid XPath expression
[/inspect_a_car/calculation/mileage div$ {age}]!
java.lang.NullPointerException java.lang.NullPointerException at
org.javarosa.core.model.FormDef.addTriggerable(FormDef.java:524) at
org.javarosa.xform.parse.XFormParser.processStandardBindAttributes(XFormParser.java:1501)
at org.javarosa.xform.parse.XFormParser.parseBind(XFormParser.java:1521) at
org.javarosa.xform.parse.XFormParser.parseModel(XFormParser.java:460) at
org.javarosa.xform.parse.XFormParser.access$200(XFormParser.java:78) at
org.javarosa.xform.parse.XFormParser$3.handle(XFormParser.java:153) at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:375) at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:386) at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:386) at
org.javarosa.xform.parse.XFormParser.parseDoc(XFormParser.java:321) at
org.javarosa.xform.parse.XFormParser.parse(XFormParser.java:272) at
org.javarosa.xform.util.XFormUtils.getFormFromInputStream(XFormUtils.java:72)
at org.odk.validate.FormValidator.validate(FormValidator.java:322) at
org.odk.validate.FormValidator.(FormValidator.java:95) at
org.odk.validate.FormValidator.main(FormValidator.java:82) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616) at
org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
On Tue, Dec 4, 2012 at 10:03 AM, Gaetano Borriello < gaetano@cs.washington.edu> wrote:
Sorry I can't check this out quickly but you might try putting spaces
around the operator "div" in your expression.
I've never see it all without spaces as you have it.On Mon, Dec 3, 2012 at 11:27 PM, Larisa Liepins larisa@imobi.co.zawrote:
Hi,
We are not getting any result at all, a decimal would be ok however
Thanks
On Tue, Dec 4, 2012 at 9:25 AM, Gaetano Borriello < gaetano@cs.washington.edu> wrote:
Division by integers yields an integer result (truncated, not rounded).
From your form it looks like mileage could be a decimal which would then
cause the calculation to yield a decimal result. Does this explain the
problem you are having?On Mon, Dec 3, 2012 at 10:58 PM, Imobi larisa@imobi.co.za wrote:
Hi again,
It seems as though the calculation still does not work. Do you know
why?
Please find attached my excel form; see J49Thank you!
On Tuesday, November 27, 2012 8:30:05 AM UTC+2, Imobi wrote:
Thanks Chris
On Mon, Nov 26, 2012 at 2:56 PM, Christopher Robert < Christopher_Robert@hks.**harvard.eduChristopher_Robert@hks.harvard.edu wrote:
Imobi,
You can use "div" for divide. See the full list of operators here:
http://www.w3schools.com/xpath/xpath_operators.asphttp://www.w3schools.com/xpath/xpath_operators.asp(and functions here:
https://bitbucket.org/**javarosa/javarosa/wiki/xform-
jr-compat#!paths-and-**expressionshttps://bitbucket.org/javarosa/javarosa/wiki/xform-jr-compat#!paths-and-expressions
).Best,
Chris
On Monday, November 26, 2012, Imobi wrote:
Hi there,
Hoping someone can help - working in Excel.
Wondering what value I must put in a field if I want to divide? I
would like to substitute the (+) for a divide in the following equation >
${mileage}+${age}Thank you
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@**googlegroups.com
Options: http://groups.google.com/**group/opendatakit?hl=enhttp://groups.google.com/group/opendatakit?hl=en--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@**googlegroups.comopendatakit%2Bunsubscribe@googlegroups.com
Options: http://groups.google.com/**group/opendatakit?hl=enhttp://groups.google.com/group/opendatakit?hl=en--
Larisa Liepins
O. 021 762 1661
C. 074 284 1688--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en--
Larisa Liepins
O. 021 762 1661
C. 074 284 1688--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
--
Larisa Liepins
O. 021 762 1661
C. 074 284 1688
It should be "${mileage} div ${age}" (without the quotes).
Hi
I just tried adding the spaces in however than I am unable to convert it
to XLS. It gives the following error:
(without the spacing I do not receive an error)Error: ODK Validate Errors: Invalid XPath expression
[/inspect_a_car/calculation/mileage div$ {age}]!
java.lang.NullPointerException java.lang.NullPointerException at
org.javarosa.core.model.FormDef.addTriggerable(FormDef.java:524) at
org.javarosa.xform.parse.XFormParser.processStandardBindAttributes(XFormParser.java:1501)
at org.javarosa.xform.parse.XFormParser.parseBind(XFormParser.java:1521) at
org.javarosa.xform.parse.XFormParser.parseModel(XFormParser.java:460) at
org.javarosa.xform.parse.XFormParser.access$200(XFormParser.java:78) at
org.javarosa.xform.parse.XFormParser$3.handle(XFormParser.java:153) at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:375) at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:386) at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:386) at
org.javarosa.xform.parse.XFormParser.parseDoc(XFormParser.java:321) at
org.javarosa.xform.parse.XFormParser.parse(XFormParser.java:272) at
org.javarosa.xform.util.XFormUtils.getFormFromInputStream(XFormUtils.java:72)
at org.odk.validate.FormValidator.validate(FormValidator.java:322) at
org.odk.validate.FormValidator.(FormValidator.java:95) at
org.odk.validate.FormValidator.main(FormValidator.java:82) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616) at
org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)Something broke the parser. See above for a hint. Result: Invalid
On Tue, Dec 4, 2012 at 10:03 AM, Gaetano Borriello < gaetano@cs.washington.edu> wrote:
Sorry I can't check this out quickly but you might try putting spaces
around the operator "div" in your expression.
I've never see it all without spaces as you have it.On Mon, Dec 3, 2012 at 11:27 PM, Larisa Liepins larisa@imobi.co.zawrote:
Hi,
We are not getting any result at all, a decimal would be ok however
Thanks
On Tue, Dec 4, 2012 at 9:25 AM, Gaetano Borriello < gaetano@cs.washington.edu> wrote:
Division by integers yields an integer result (truncated, not rounded).
From your form it looks like mileage could be a decimal which would then
cause the calculation to yield a decimal result. Does this explain the
problem you are having?On Mon, Dec 3, 2012 at 10:58 PM, Imobi larisa@imobi.co.za wrote:
Hi again,
It seems as though the calculation still does not work. Do you know
why?
Please find attached my excel form; see J49Thank you!
On Tuesday, November 27, 2012 8:30:05 AM UTC+2, Imobi wrote:
Thanks Chris
On Mon, Nov 26, 2012 at 2:56 PM, Christopher Robert < Christopher_Robert@hks.**harvard.eduChristopher_Robert@hks.harvard.edu wrote:
Imobi,
You can use "div" for divide. See the full list of operators here:
http://www.w3schools.com/xpath/xpath_operators.asphttp://www.w3schools.com/xpath/xpath_operators.asp(and functions here:
https://bitbucket.org/**javarosa/javarosa/wiki/xform-
jr-compat#!paths-and-**expressionshttps://bitbucket.org/javarosa/javarosa/wiki/xform-jr-compat#!paths-and-expressions
).Best,
Chris
On Monday, November 26, 2012, Imobi wrote:
Hi there,
Hoping someone can help - working in Excel.
Wondering what value I must put in a field if I want to divide? I
would like to substitute the (+) for a divide in the following equation >
${mileage}+${age}Thank you
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@**googlegroups.com
Options: http://groups.google.com/**group/opendatakit?hl=enhttp://groups.google.com/group/opendatakit?hl=en--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@**googlegroups.comopendatakit%2Bunsubscribe@googlegroups.com
Options: http://groups.google.com/**group/opendatakit?hl=enhttp://groups.google.com/group/opendatakit?hl=en--
Larisa Liepins
O. 021 762 1661
C. 074 284 1688--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en--
Larisa Liepins
O. 021 762 1661
C. 074 284 1688--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en--
Larisa Liepins
O. 021 762 1661
C. 074 284 1688--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
I added the spaces and displayed the result using a note. I have attached
the form which worked. Try it.
Mito
inspect_a_car.xls (38.5 KB)
Hi
I just tried adding the spaces in however than I am unable to convert it to
XLS. It gives the following error:
(without the spacing I do not receive an error)
Error: ODK Validate Errors: Invalid XPath expression
[/inspect_a_car/calculation/mileage div$ {age}]!
java.lang.NullPointerException java.lang.NullPointerException at
org.javarosa.core.model.FormDef.addTriggerable(FormDef.java:524) at
org.javarosa.xform.parse.XFormParser.processStandardBindAttributes(XFormPars
er.java:1501) at
org.javarosa.xform.parse.XFormParser.parseBind(XFormParser.java:1521) at
org.javarosa.xform.parse.XFormParser.parseModel(XFormParser.java:460) at
org.javarosa.xform.parse.XFormParser.access$200(XFormParser.java:78) at
org.javarosa.xform.parse.XFormParser$3.handle(XFormParser.java:153) at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:375) at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:386) at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:386) at
org.javarosa.xform.parse.XFormParser.parseDoc(XFormParser.java:321) at
org.javarosa.xform.parse.XFormParser.parse(XFormParser.java:272) at
org.javarosa.xform.util.XFormUtils.getFormFromInputStream(XFormUtils.java:72
) at org.odk.validate.FormValidator.validate(FormValidator.java:322) at
org.odk.validate.FormValidator.(FormValidator.java:95) at
org.odk.validate.FormValidator.main(FormValidator.java:82) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57
) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at
org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.jav
a:58) >> Something broke the parser. See above for a hint. Result: Invalid
On Tue, Dec 4, 2012 at 10:03 AM, Gaetano Borriello <gaetano@cs.washington.edu mailto:gaetano@cs.washington.edu > wrote:
Sorry I can't check this out quickly but you might try putting spaces around
the operator "div" in your expression.
I've never see it all without spaces as you have it.
On Mon, Dec 3, 2012 at 11:27 PM, Larisa Liepins <larisa@imobi.co.za mailto:larisa@imobi.co.za > wrote:
Hi,
We are not getting any result at all, a decimal would be ok however
Thanks
On Tue, Dec 4, 2012 at 9:25 AM, Gaetano Borriello <gaetano@cs.washington.edu mailto:gaetano@cs.washington.edu > wrote:
Division by integers yields an integer result (truncated, not rounded).
From your form it looks like mileage could be a decimal which would then
cause the calculation to yield a decimal result. Does this explain the
problem you are having?
On Mon, Dec 3, 2012 at 10:58 PM, Imobi <larisa@imobi.co.za mailto:larisa@imobi.co.za > wrote:
Hi again,
It seems as though the calculation still does not work. Do you know why?
Please find attached my excel form; see J49
Thank you!
On Tuesday, November 27, 2012 8:30:05 AM UTC+2, Imobi wrote:
Thanks Chris
On Mon, Nov 26, 2012 at 2:56 PM, Christopher Robert <Christopher_Robert@hks.harvard.edu mailto:Christopher_Robert@hks.harvard.edu > wrote:
Imobi,
You can use "div" for divide. See the full list of operators here:
http://www.w3schools.com/xpath/xpath_operators.asp (and functions here:
https://bitbucket.org/javarosa/javarosa/wiki/xform-jr-compat#!paths-and-expr
essions).
Best,
Chris
On Monday, November 26, 2012, Imobi wrote:
Hi there,
Hoping someone can help - working in Excel.
Wondering what value I must put in a field if I want to divide? I would like
to substitute the (+) for a divide in the following equation >
${mileage}+${age}
Thank you
--
Post: opendatakit@googlegroups.com mailto:opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
mailto:opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
--
Post: opendatakit@googlegroups.com mailto:opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
mailto:opendatakit%2Bunsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
--
Larisa Liepins
O. 021 762 1661
C. 074 284 1688
--
Post: opendatakit@googlegroups.com mailto:opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
mailto:opendatakit%2Bunsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
--
Post: opendatakit@googlegroups.com mailto:opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
mailto:opendatakit%2Bunsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
--
Larisa Liepins
O. 021 762 1661
C. 074 284 1688
--
Post: opendatakit@googlegroups.com mailto:opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
mailto:opendatakit%2Bunsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
--
Post: opendatakit@googlegroups.com mailto:opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
mailto:opendatakit%2Bunsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
--
Larisa Liepins
O. 021 762 1661
C. 074 284 1688
--
Post: opendatakit@googlegroups.com mailto:opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
mailto:opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
When displaying fields on the same screen (field-list), value changes in
one field are not propagated through calculates or relevant conditions to
any of the other fields on the screen.
So if you are trying to display the calculated field value on the same
screen (field-list), as the values that feed into that formula, this will
not work.
You need to advance to a new screen to have those values propagate through
the formula and the calculated value be correct.
Mitch
I added the spaces and displayed the result using a note. I have attached
the form which worked. Try it.****
Mito****
From: opendatakit@googlegroups.com [mailto:opendatakit@googlegroups.com]
On Behalf Of Larisa Liepins
Sent: 04 December 2012 10:43 AM
To: opendatakit@googlegroups.com
Subject: Re: [ODK Community] calculation method - divide**
Hi****
I just tried adding the spaces in however than I am unable to convert it
to XLS. It gives the following error:****(without the spacing I do not receive an error)****
Error: ODK Validate Errors: Invalid XPath expression
[/inspect_a_car/calculation/mileage div$ {age}]!
java.lang.NullPointerException java.lang.NullPointerException at
org.javarosa.core.model.FormDef.addTriggerable(FormDef.java:524) at
org.javarosa.xform.parse.XFormParser.processStandardBindAttributes(XFormParser.java:1501)
at org.javarosa.xform.parse.XFormParser.parseBind(XFormParser.java:1521) at
org.javarosa.xform.parse.XFormParser.parseModel(XFormParser.java:460) at
org.javarosa.xform.parse.XFormParser.access$200(XFormParser.java:78) at
org.javarosa.xform.parse.XFormParser$3.handle(XFormParser.java:153) at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:375) at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:386) at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:386) at
org.javarosa.xform.parse.XFormParser.parseDoc(XFormParser.java:321) at
org.javarosa.xform.parse.XFormParser.parse(XFormParser.java:272) at
org.javarosa.xform.util.XFormUtils.getFormFromInputStream(XFormUtils.java:72)
at org.odk.validate.FormValidator.validate(FormValidator.java:322) at
org.odk.validate.FormValidator.(FormValidator.java:95) at
org.odk.validate.FormValidator.main(FormValidator.java:82) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616) at
org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)Something broke the parser. See above for a hint. Result: Invalid****
On Tue, Dec 4, 2012 at 10:03 AM, Gaetano Borriello <
gaetano@cs.washington.edu> wrote:****Sorry I can't check this out quickly but you might try putting spaces
around the operator "div" in your expression. ****I've never see it all without spaces as you have it.****
On Mon, Dec 3, 2012 at 11:27 PM, Larisa Liepins larisa@imobi.co.za
wrote:****Hi,
We are not getting any result at all, a decimal would be ok however****
Thanks****
On Tue, Dec 4, 2012 at 9:25 AM, Gaetano Borriello <
gaetano@cs.washington.edu> wrote:****Division by integers yields an integer result (truncated, not rounded).
From your form it looks like mileage could be a decimal which would then
cause the calculation to yield a decimal result. Does this explain the
problem you are having?****
On Mon, Dec 3, 2012 at 10:58 PM, Imobi larisa@imobi.co.za wrote:****
Hi again,****
It seems as though the calculation still does not work. Do you know why?
Please find attached my excel form; see J49****Thank you!
On Tuesday, November 27, 2012 8:30:05 AM UTC+2, Imobi wrote:****
Thanks Chris****
On Mon, Nov 26, 2012 at 2:56 PM, Christopher Robert <
Christopher_Robert@hks.harvard.edu> wrote:****Imobi,****
You can use "div" for divide. See the full list of operators here:
http://www.w3schools.com/xpath/xpath_operators.asp (and functions here:
https://bitbucket.org/javarosa/javarosa/wiki/xform-jr-compat#!paths-and-expressions
).****
Best,****
Chris
On Monday, November 26, 2012, Imobi wrote:****
Hi there,****
Hoping someone can help - working in Excel.****
Wondering what value I must put in a field if I want to divide? I would
like to substitute the (+) for a divide in the following equation > *
${mileage}+${age}*****
Thank you****
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****
-- ****
Larisa Liepins
O. 021 762 1661
C. 074 284 1688****
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****
-- ****
Larisa Liepins
O. 021 762 1661
C. 074 284 1688****
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****
-- ****
Larisa Liepins
O. 021 762 1661
C. 074 284 1688****
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com
Thanks so much! got it working
I added the spaces and displayed the result using a note. I have attached
the form which worked. Try it.****
Mito****
From: opendatakit@googlegroups.com [mailto:opendatakit@googlegroups.com]
On Behalf Of Larisa Liepins
Sent: 04 December 2012 10:43 AM
To: opendatakit@googlegroups.com
Subject: Re: [ODK Community] calculation method - divide**
Hi****
I just tried adding the spaces in however than I am unable to convert it
to XLS. It gives the following error:****(without the spacing I do not receive an error)****
Error: ODK Validate Errors: Invalid XPath expression
[/inspect_a_car/calculation/mileage div$ {age}]!
java.lang.NullPointerException java.lang.NullPointerException at
org.javarosa.core.model.FormDef.addTriggerable(FormDef.java:524) at
org.javarosa.xform.parse.XFormParser.processStandardBindAttributes(XFormParser.java:1501)
at org.javarosa.xform.parse.XFormParser.parseBind(XFormParser.java:1521) at
org.javarosa.xform.parse.XFormParser.parseModel(XFormParser.java:460) at
org.javarosa.xform.parse.XFormParser.access$200(XFormParser.java:78) at
org.javarosa.xform.parse.XFormParser$3.handle(XFormParser.java:153) at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:375) at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:386) at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:386) at
org.javarosa.xform.parse.XFormParser.parseDoc(XFormParser.java:321) at
org.javarosa.xform.parse.XFormParser.parse(XFormParser.java:272) at
org.javarosa.xform.util.XFormUtils.getFormFromInputStream(XFormUtils.java:72)
at org.odk.validate.FormValidator.validate(FormValidator.java:322) at
org.odk.validate.FormValidator.(FormValidator.java:95) at
org.odk.validate.FormValidator.main(FormValidator.java:82) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616) at
org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)Something broke the parser. See above for a hint. Result: Invalid****
On Tue, Dec 4, 2012 at 10:03 AM, Gaetano Borriello <
gaetano@cs.washington.edu> wrote:****Sorry I can't check this out quickly but you might try putting spaces
around the operator "div" in your expression. ****I've never see it all without spaces as you have it.****
On Mon, Dec 3, 2012 at 11:27 PM, Larisa Liepins larisa@imobi.co.za
wrote:****Hi,
We are not getting any result at all, a decimal would be ok however****
Thanks****
On Tue, Dec 4, 2012 at 9:25 AM, Gaetano Borriello <
gaetano@cs.washington.edu> wrote:****Division by integers yields an integer result (truncated, not rounded).
From your form it looks like mileage could be a decimal which would then
cause the calculation to yield a decimal result. Does this explain the
problem you are having?****
On Mon, Dec 3, 2012 at 10:58 PM, Imobi larisa@imobi.co.za wrote:****
Hi again,****
It seems as though the calculation still does not work. Do you know why?
Please find attached my excel form; see J49****Thank you!
On Tuesday, November 27, 2012 8:30:05 AM UTC+2, Imobi wrote:****
Thanks Chris****
On Mon, Nov 26, 2012 at 2:56 PM, Christopher Robert <
Christopher_Robert@hks.harvard.edu> wrote:****Imobi,****
You can use "div" for divide. See the full list of operators here:
http://www.w3schools.com/xpath/xpath_operators.asp (and functions here:
https://bitbucket.org/javarosa/javarosa/wiki/xform-jr-compat#!paths-and-expressions
).****
Best,****
Chris
On Monday, November 26, 2012, Imobi wrote:****
Hi there,****
Hoping someone can help - working in Excel.****
Wondering what value I must put in a field if I want to divide? I would
like to substitute the (+) for a divide in the following equation > *
${mileage}+${age}*****
Thank you****
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****
-- ****
Larisa Liepins
O. 021 762 1661
C. 074 284 1688****
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****
-- ****
Larisa Liepins
O. 021 762 1661
C. 074 284 1688****
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****
-- ****
Larisa Liepins
O. 021 762 1661
C. 074 284 1688****
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
--
Larisa Liepins
O. 021 762 1661
C. 074 284 1688
Thank so much for the help!
When displaying fields on the same screen (field-list), value changes in
one field are not propagated through calculates or relevant conditions to
any of the other fields on the screen.So if you are trying to display the calculated field value on the same
screen (field-list), as the values that feed into that formula, this will
not work.You need to advance to a new screen to have those values propagate through
the formula and the calculated value be correct.Mitch
On Tue, Dec 4, 2012 at 1:34 AM, Mofya Phiri mofya1@gmail.com wrote:
I added the spaces and displayed the result using a note. I have attached
the form which worked. Try it.****
Mito****
From: opendatakit@googlegroups.com [mailto:opendatakit@googlegroups.com]
On Behalf Of Larisa Liepins
Sent: 04 December 2012 10:43 AM
To: opendatakit@googlegroups.com
Subject: Re: [ODK Community] calculation method - divide**
Hi****
I just tried adding the spaces in however than I am unable to convert it
to XLS. It gives the following error:****(without the spacing I do not receive an error)****
Error: ODK Validate Errors: Invalid XPath expression
[/inspect_a_car/calculation/mileage div$ {age}]!
java.lang.NullPointerException java.lang.NullPointerException at
org.javarosa.core.model.FormDef.addTriggerable(FormDef.java:524) at
org.javarosa.xform.parse.XFormParser.processStandardBindAttributes(XFormParser.java:1501)
at org.javarosa.xform.parse.XFormParser.parseBind(XFormParser.java:1521) at
org.javarosa.xform.parse.XFormParser.parseModel(XFormParser.java:460) at
org.javarosa.xform.parse.XFormParser.access$200(XFormParser.java:78) at
org.javarosa.xform.parse.XFormParser$3.handle(XFormParser.java:153) at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:375) at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:386) at
org.javarosa.xform.parse.XFormParser.parseElement(XFormParser.java:386) at
org.javarosa.xform.parse.XFormParser.parseDoc(XFormParser.java:321) at
org.javarosa.xform.parse.XFormParser.parse(XFormParser.java:272) at
org.javarosa.xform.util.XFormUtils.getFormFromInputStream(XFormUtils.java:72)
at org.odk.validate.FormValidator.validate(FormValidator.java:322) at
org.odk.validate.FormValidator.(FormValidator.java:95) at
org.odk.validate.FormValidator.main(FormValidator.java:82) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616) at
org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)Something broke the parser. See above for a hint. Result: Invalid****
On Tue, Dec 4, 2012 at 10:03 AM, Gaetano Borriello <
gaetano@cs.washington.edu> wrote:****Sorry I can't check this out quickly but you might try putting spaces
around the operator "div" in your expression. ****I've never see it all without spaces as you have it.****
On Mon, Dec 3, 2012 at 11:27 PM, Larisa Liepins larisa@imobi.co.za
wrote:****Hi,
We are not getting any result at all, a decimal would be ok however****
Thanks****
On Tue, Dec 4, 2012 at 9:25 AM, Gaetano Borriello <
gaetano@cs.washington.edu> wrote:****Division by integers yields an integer result (truncated, not rounded).
From your form it looks like mileage could be a decimal which would then
cause the calculation to yield a decimal result. Does this explain the
problem you are having?****
On Mon, Dec 3, 2012 at 10:58 PM, Imobi larisa@imobi.co.za wrote:****
Hi again,****
It seems as though the calculation still does not work. Do you know why?
Please find attached my excel form; see J49****Thank you!
On Tuesday, November 27, 2012 8:30:05 AM UTC+2, Imobi wrote:****
Thanks Chris****
On Mon, Nov 26, 2012 at 2:56 PM, Christopher Robert <
Christopher_Robert@hks.harvard.edu> wrote:****Imobi,****
You can use "div" for divide. See the full list of operators here:
http://www.w3schools.com/xpath/xpath_operators.asp (and functions here:
https://bitbucket.org/javarosa/javarosa/wiki/xform-jr-compat#!paths-and-expressions
).****
Best,****
Chris
On Monday, November 26, 2012, Imobi wrote:****
Hi there,****
Hoping someone can help - working in Excel.****
Wondering what value I must put in a field if I want to divide? I would
like to substitute the (+) for a divide in the following equation > *
${mileage}+${age}*****
Thank you****
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****
-- ****
Larisa Liepins
O. 021 762 1661
C. 074 284 1688****
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****
-- ****
Larisa Liepins
O. 021 762 1661
C. 074 284 1688****
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****
-- ****
Larisa Liepins
O. 021 762 1661
C. 074 284 1688****
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en****--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en--
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
--
Larisa Liepins
O. 021 762 1661
C. 074 284 1688