Note that there are some explanatory texts on larger screens.

plurals
  1. POXpages (Date time stamp) validation & order of evaluation
    primarykey
    data
    text
    <pre><code>if((!submittedBy( 'button1' )) &amp;&amp; (!submittedBy( 'button2' ) { return true; } else { var IsL2UserTxt = sessionScope.get("IsL2User"); if(IsL2UserTxt == "Yes") { //Bring the issue Date&amp;Time var start = getComponent("label_IssueDateDt").getValue(); //Bring the Permenent Fix Target Date&amp;Time var end = this.getSubmittedValue(); var dStart:NotesDateTime = session.createDateTime(start); var dEnd:NotesDateTime = session.createDateTime(end); if (!start) { return false; } else if (!end) { return false; } else { print("Start: "+start+", End: "+end+",DStart: "+dStart+", DEnd: "+dEnd+", Time Diff: "+dEnd.timeDifference(dStart)); return (dEnd.timeDifference(dStart) &gt; 0 ) } } else { return true; } } </code></pre> <p>I have two Date Timestamp editboxes in my xpage, I written a validateExpression code as shown above on my second datetime stamp(Permenent Fix tartget Date&amp;Time) editbox. Here validation is required such a way that permaenent fix Target date&amp;Time should be greater that Issue date&amp;time( dEnd.timeDifference(dStart) > 0 ).</p> <p>*<strong><em>The above code works in scenario such that, if issue date is 24/04/2012 11:16:51 AM and permaenent fix Target date&amp;Time 23/04/2012 11:16:51 AM . But it fails if my permaenent fix Target date&amp;Time is between 05/04/2012 to 12/04/2012. I think there is problem with date time formats as the submitted value of the permaenent fix Target date is coming like this e.g 2012-04-12T11:16:45+05:30.</em>*</strong> </p> <p>So is there any solution to format date time value of the submitted value to avoide above issue.</p> <p>One more thing about the order of evaluation of validation in xpages.. As validation error message control showing messages randomly not in proper order.</p> <p>Looking for your positive responses.</p> <p>Regards, Yogesh </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload