Problems with Validation Condition logic

I am trying to place a validation condition on entering a date. It needs
to be equal to or less then “todays date” and greater then a date from a
previous question.

I have tried . <= today() and /data/date_uree_1 = “” or /data/date_uree_1 <
. And I am unable to answer the question with any date (before or after)

I have also tried .<=today () and .>/data/date and have the same problem.

Thanks
Andrea

Hi Andrea,

I think you are on the right track: . <= today() and . > /data/date_uree_1
seems like it should work (assuming that date_uree_1 is prior to today).
You could also try using date() around the reference to see if that helps
with the format of the data; in that case it would look like:

. <= today() and . > date(/data/date_uree_1)

If it still isn’t working you might just test it out using each part of
that validation to ensure it is working independently prior to combining
them.

Jeremy

··· On Fri, Jul 8, 2016 at 9:22 AM, Andrea Sabelli wrote:

I am trying to place a validation condition on entering a date. It needs
to be equal to or less then “todays date” and greater then a date from a
previous question.

I have tried . <= today() and /data/date_uree_1 = “” or /data/date_uree_1
< . And I am unable to answer the question with any date (before or after)

I have also tried .<=today () and .>/data/date and have the same problem.

Thanks
Andrea


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jeremy Wacksman
Dimagi http://www.dimagi.com, Inc.