I am getting a validation error on setting default data value as
today() for the date question type in cchq form. I have set default
date type to "today()" many times in the past (in both, version 1.3
and 2.0) but never had an error before.
For debugging purposes, the exact error I am receiving is
"java.lang.IllegalArgumentException: Invalid cast of data [today()] to
type Date."
Will appreciate if someone can look into it and provide some help.
On which version of CommCare are you receiving this error?
-Clayton
···
On Fri, Apr 27, 2012 at 6:43 AM, Chandni wrote:
Hi,
I am getting a validation error on setting default data value as
today() for the date question type in cchq form. I have set default
date type to "today()" many times in the past (in both, version 1.3
and 2.0) but never had an error before.
For debugging purposes, the exact error I am receiving is
"java.lang.IllegalArgumentException: Invalid cast of data [today()] to
type Date."
Will appreciate if someone can look into it and provide some help.
I am getting a validation error on setting default data value as
today() for the date question type in cchq form. I have set default
date type to "today()" many times in the past (in both, version 1.3
and 2.0) but never had an error before.
For debugging purposes, the exact error I am receiving is
"java.lang.IllegalArgumentException: Invalid cast of data [today()] to
type Date."
Will appreciate if someone can look into it and provide some help.
I am getting a validation error on setting default data value as
today() for the date question type in cchq form. I have set default
date type to "today()" many times in the past (in both, version 1.3
and 2.0) but never had an error before.
For debugging purposes, the exact error I am receiving is
"java.lang.IllegalArgumentException: Invalid cast of data [today()] to
type Date."
Will appreciate if someone can look into it and provide some help.
Yeah, I was trying to set it in Vellum using "Default Data Value" in
advanced properties.
In order to reconfirm the problem with using today() function in vellum, I
tried to rebuild an old 2.0 app that I was able to build and test on phone
in the past; the rebuilding of this previously working app failed and threw
the same error as mentioned earlier "java.lang.IllegalArgumentException:
Invalid cast of data [today()] to type Date."
-Chandni
···
On Fri, Apr 27, 2012 at 10:19 AM, Clayton Sims wrote:
When you say that you are setting the default date to "today()" how are
you doing so? In Vellum? Using what field, exactly?
I am getting a validation error on setting default data value as
today() for the date question type in cchq form. I have set default
date type to "today()" many times in the past (in both, version 1.3
and 2.0) but never had an error before.
For debugging purposes, the exact error I am receiving is
"java.lang.IllegalArgumentException: Invalid cast of data [today()] to
type Date."
Will appreciate if someone can look into it and provide some help.
The Default Data Value field in Vellum is only compatible with actual data
(a specific date), not with xpath expressions, unfortunately. That's
something we'll be adding support for in CommCare 2.0 in the future, but
wasn't something we supported in the past.
In ODK, all date entry fields default to the current date, so you shouldn't
need to set that value explicitly.
-Clayton
···
On Fri, Apr 27, 2012 at 1:48 PM, Chandni Dhanjal wrote:
Yeah, I was trying to set it in Vellum using "Default Data Value" in
advanced properties.
In order to reconfirm the problem with using today() function in vellum, I
tried to rebuild an old 2.0 app that I was able to build and test on phone
in the past; the rebuilding of this previously working app failed and threw
the same error as mentioned earlier "java.lang.IllegalArgumentException:
Invalid cast of data [today()] to type Date."
-Chandni
On Fri, Apr 27, 2012 at 10:19 AM, Clayton Sims csims@dimagi.com wrote:
When you say that you are setting the default date to "today()" how are
you doing so? In Vellum? Using what field, exactly?
I am getting a validation error on setting default data value as
today() for the date question type in cchq form. I have set default
date type to "today()" many times in the past (in both, version 1.3
and 2.0) but never had an error before.
For debugging purposes, the exact error I am receiving is
"java.lang.IllegalArgumentException: Invalid cast of data [today()] to
type Date."
Will appreciate if someone can look into it and provide some help.