Todd Dignan Posted May 21, 2003 Posted May 21, 2003 I have two date field on my web page. End Date and Start Date. Start Date is a pull down. Start Date can be blank. If Start Date is not blank. I need to be less than the End date. I have a Field Validation in Start date field. If(not IsEmpty(start date) and end Date %u2264 Start Date,0,1) I do have an error page based on error 507 ( failed calc validation) This works sometime on the web and sometime not. it needs to contestant. Would Java be easier? Thank for any help.
CobaltSky Posted May 21, 2003 Posted May 21, 2003 Hello Todd, I imagine your problem stems from the fact that once the start date has been validated, users can then edit the end date to a date that precedes the start date? To address that, you would need a validation: EndDate > StartDate on the EndDate field. Also, I suggest that you change your start date validation to cast it positively, thus: StartDate < EndDate ...which will only be invoked if a value is entered into StartDate (so there is no need to deal separately with the IsEmpty criterion) and is simpler and more direct than the syntax you are using at present.
cjaeger Posted May 21, 2003 Posted May 21, 2003 when dealing with entering starting and ending numbers, I always do it like that: startdate=min(date1,date2) enddate=max(date1,date2) this way it does not matter which date is put into which field. In your case, this could mess up you validation, but you could catch the errors on the above calc as well ....
Leb i Sol Posted May 21, 2003 Posted May 21, 2003 is this just CDML u are after?...hm well here is a code snipp and perhaps some more "food for the brain": From: <input type="hidden" name="-op" value="gte"> <input name="Date" type="text" id="Date" tabindex="9" value="" size="15"> To: <input type="hidden" name="-op" value="lte"> <input name="Date" type="text" id="Date" tabindex="9" value="[FMP-CurrentDate]" size="15"> good luck
Leb i Sol Posted May 21, 2003 Posted May 21, 2003 ops just read the post fully....my post is for one DB field (called "Date")...but u can apply it to 2
Recommended Posts
This topic is 7926 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now