wsharba / opendatakit

Automatically exported from code.google.com/p/opendatakit
0 stars 1 forks source link

XPath evaluation: cannot handle function 'floor' #1066

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Converting XLSForm using application on website.

What is the expected output? What do you see instead?
Error: ODK Validate Errors: org.javarosa.core.log.WrappedException: Error 
evaluating field 'femmebureauscore': The problem was located in calculate 
expression for ${femmebureauscore} XPath evaluation: cannot handle function 
'floor' => org.javarosa.xpath.XPathUnhandledException[The problem was located 
in calculate expression for ${femmebureauscore} XPath evaluation: cannot handle 
function 'floor']

What version of the product are you using? On what operating system?
XLSForm application on the ODK website.
I'm using windows 8

Please provide any additional information below.

The part of the form that causes problem is attached.
calculation field is:
floor(((${Nbres_Membre_bureau_Femmes}div(${Nbres_Membre_bureau_Femmes}+${Nbres_M
embre_bureau_Hommes}))+0.18)*4.5)-1

and it seems not to be accepted. Any reason for that?

Original issue reported on code.google.com by yannick....@gmail.com on 17 Sep 2014 at 10:07

Attachments:

GoogleCodeExporter commented 9 years ago
floor is not a recognized function.

See https://opendatakit.org/help/form-design/binding/

And see 
https://bitbucket.org/m.sundt/javarosa/src/61b1306c539c/core/src/org/javarosa/xp
ath/expr/XPathFuncExpr.java#cl-126

for all the available functions. "floor" is not among them.

If you want it added, code contributions are welcome. Work with us to get them 
merged into the mainline.

Original comment by mitchellsundt@gmail.com on 16 Oct 2014 at 11:15