11/25/2024 6:38:50 AM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss SalesLogix legacy development including views, scripts, etc.. View the code of conduct for posting guidelines.
|
|
|
|
date validation
Posted: 04 Oct 06 10:12 AM
|
fiogf49gjkf0d I am new to programming slx so the legacy forms can be overwhelming to me at times . I am going to add a field to a support form, I am using a user field that has a string data type. The field requires the end user to enter a date and I would like to validate the entry with the WhenValidate event to make sure the user is entering a date formatted as mm/dd/yyyy. Any suggestions on the easiest method of coding this would be greatly appreciated. Thanks. |
|
|
|
Re: date validation
Posted: 06 Oct 06 12:15 AM
|
fiogf49gjkf0d Hi Bill, Instead of using string field why don't you use SLX date control which takes care of date format itself. If you still want to use string field then you have to write validation for enter value. Means months should not be greater than 12, date should not be greated than 31 depends on the month etc. |
|
|
|
Re: date validation
Posted: 06 Oct 06 8:05 AM
|
fiogf49gjkf0d That was my original plan when I started making this change, but there weren't any existing date/time fields in the table I am working with. I chose to use a userfield and code the validation for the users entry in that field. |
|
|
|
Re: date validation
Posted: 06 Oct 06 8:16 AM
|
fiogf49gjkf0d Then you have to put validation on control exit event. That's the only way. |
|
|
|
Re: date validation
Posted: 09 Oct 06 7:54 AM
|
fiogf49gjkf0d If you still want to use string field then you have to write validation for enter value. Means months should not be greater than 12, date should not be greated than 31 depends on the month etc. Instead of validating the string like a date, why not convert the string to a date. If this fails then its an invalid date and make the user enter a correct date.
If you are upgrading to 7.0 then this problem can be fixed because you will be able to add custom fields to stock tables. In this case you'd add a date field and use the SLX date control for input.
I'd still try to use the SLX date control in whatever version you are using (which is it?)
John G. |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|