Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Date constraints should include call on date #197

Open
lognaturel opened this issue Mar 1, 2018 · 2 comments
Open

Date constraints should include call on date #197

lognaturel opened this issue Mar 1, 2018 · 2 comments
Labels

Comments

@lognaturel
Copy link
Member

Currently date constraints have XML output that looks like
"(. >= '2018-01-01') and (. <= '2018-03-31')"

The XML output should instead be something like
constraint="(. >= date('2018-01-01')) and (. <= date('2018-03-31'))"

Reported at https://forum.opendatakit.org/t/problem-with-constraint-on-date-widget/12029/

@2math
Copy link

2math commented Mar 12, 2018

It is strange, that when I change the XForm to constraint="(. >= date('2018-03-01’)) and (. <= date('2018-03-30’))” , then there is a parse error

System.err: org.xmlpull.v1.XmlPullParserException: Attr.value missing f. jr:itext (position:START_TAG <bind nodeset='/data/select_date' type='date' constraint='(. >= date('2018-03-01’)) and (. <= date('2018-03-30’))” jr:constraintMsg=' jr:itext='jr:itext('/data/group_items/input_number:constraintMsg')'>@149:154 in java.io.InputStreamReader@419a26e)

@2math
Copy link

2math commented Mar 12, 2018

Currently woks only with : constraint="(. >= 17590) and (. <= 17620)"
As double number which is "The number of days (as a double precision floating point) since the Epoch"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants