regarding xforms

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

regarding xforms

balajim
Hai Team,

I just want some help in resolving the following issue.as I don't know much about Xforms.

<xf:constraint id="constraint-13-constraint" value=". &gt; current-date()" level="error"/>

here it is showing only value should be greater than current date and should accept only 1st day of the month.can u please provide solution.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: regarding xforms

Alessandro  Vernet
Administrator
Hi Balaji,

Assuming `.` is of type xs:date, then you should be able to use the following to check that the date is the first of the month:

    day-from-date(.) = 1

E.g.:

    day-from-date(xs:date('2017-04-05')) = 1 ⇒ returns false
    day-from-date(xs:date('2017-04-01')) = 1 ⇒ returns true

You'll let us know if this works for you,

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Loading...