Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, November 25, 2024 
 
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!
 Architect Forums - Legacy Development
Forum to discuss SalesLogix legacy development including views, scripts, etc.. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Legacy Development | New ThreadView:  Search:  
 Author  Thread: date validation
Bill
Posts: 71
 
date validationYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[Reply][Quote]
Swapnil
Posts: 46
 
Re: date validationYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[Reply][Quote]
Bill
Posts: 71
 
Re: date validationYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[Reply][Quote]
Swapnil
Posts: 46
 
Re: date validationYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Oct 06 8:16 AM
fiogf49gjkf0d
Then you have to put validation on control exit event. That's the only way.
[Reply][Quote]
John Gundrum
Posts: 632
Top 10 forum poster: 632 posts
 
Re: date validationYour last visit to this thread was on 1/1/1970 12:00:00 AM
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.
[Reply][Quote]
 Page 1 of 1 
  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!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/25/2024 6:18:47 AM