Skip navigation
Currently Being Moderated

Contract End date should not less than Start date, else CLEAR it

Mar 13, 2012 2:29 PM

Hello

 

I put CONTRACT START DATE and CONTRACT END DATE fields on the form. These 2 objects (Date/Time objjects) i pulled them from Satndard tab of pallette and dropped on my layout page design, fine.

 

Now, am trying to put a validation that the end dat eshould not lower than start date, so, i got a thread as below from Niall,

 

http://forums.adobe.com/message/1909551

 

and i did my FormCalc coding under EXIT event of END DATE field as below,

 

// Pls. note this FormCalc
// End date should not less than Start date, else CLEAR it - Begin

var stDate
var endDate

stDate = xfa.resolveNode("CUSTOMER.Page31_Contracts.Con_Whole_Page.CON_Basic_I nfo.CON_START_DATE").rawValue
endDate = xfa.resolveNode("CUSTOMER.Page31_Contracts.Con_Whole_Page.CON_Basic_I nfo.CON_END_DATE").rawValue

if (stDate > endDate) then
    xfa.host.messageBox("End date is lower than Start date! End date is cleared")
    xfa.resolveNode("CUSTOMER.Page31_Contracts.Con_Whole_Page.CON_Basic_I nfo.CON_END_DATE").rawValue = null
endif

// End date should not less than Start date, else CLEAR it - End

 

I tried in VALIDATE, CALCULATE, CHANGE events of END DATE, but nothing working!!

 

PLs. let me kow how can i achieve my requirement? I am anewbie,

 

Thank you

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points