Thanks, that documentation and that sample expression was just what I
needed to tackle my problem.
Dan
Simone Gianni wrote:
Hi Daniel,
something like this should do the trick :
<fd:assert test="And(Not(IsNull(startdate)), enddate >
startdate)">
Or something similar. These are currently daisy expressions, you can
read more about them here :
http://cocoondev.org/xreporter/docs/core/exprlang.html . IsNull is an
expression added to the xreporter language by cocoon forms to do exactly
this kind of tricks.
Hope this helps,
Simone
Daniel Curran wrote:
I have two dates defined as:
<fd:field id="startdate">
<fd:label>Start Date</fd:label>
<fd:datatype base="date">
<fd:convertor type="formatting">
<fd:patterns>
<fd:pattern>MM/dd/yyyy</fd:pattern>
</fd:patterns>
</fd:convertor>
</fd:datatype>
</fd:field>
<fd:field id="enddate">
<fd:label>End Date</fd:label>
<fd:datatype base="date">
<fd:convertor type="formatting">
<fd:patterns>
<fd:pattern>MM/dd/yyyy</fd:pattern>
</fd:patterns>
</fd:convertor>
</fd:datatype>
<fd:validation>
<fd:assert test="enddate > startdate">
<fd:failmessage>End date must be greater than the Start
date</fd:failmessage>
</fd:assert>
</fd:validation>
</fd:field>
When I set an end date, but leave the start date null I get an error
_Error evaluating expression on assert validation rule._
I would like the test to pass if either or both fields values are null.
Does anyone know how this would be accomplished? I am also interested
in documentation of the types of rules that can be used, where should
I look for this?
Thanks,
Dan Curran
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]