Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, June 19, 2025 
 
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 - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Help with Validate Fields
Rene Paredes
Posts: 6
 
Help with Validate FieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Feb 07 8:46 AM
fiogf49gjkf0d
how could I validate that only input numeric value in a field??
for example, if i have the field txtFhone how do I can validate
the input to allow only number(not letters).

thanks
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Help with Validate FieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Feb 07 12:45 PM
fiogf49gjkf0d
I use the following on the keypress event of the editbox for example:
  ' Only allow numeric values
if ((47 < KEY) AND (KEY < 58)) then
' Numeric value entered
else
KEY = 0
end if

Hope this helps!

Timmus
[Reply][Quote]
Rene Paredes
Posts: 6
 
Re: Help with Validate FieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Feb 07 11:32 AM
fiogf49gjkf0d
Quote:
Originally posted by Timmus Agersea

I use the following on the keypress event of the editbox for example:
  ' Only allow numeric values
if ((47 < KEY) AND (KEY < 58)) then
' Numeric value entered
else
KEY = 0
end if

Hope this helps!

Timmus


Thanks, this is that I need.
[Reply][Quote]
Ina Nortje
Posts: 57
 
Re: Help with Validate FieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Aug 07 3:34 AM
To also allow for a decimal point (i.e. to allow float type entries), you can amend the code as follows:

' Only allow numeric values and decimal point
if ((47 < KEY) AND (KEY < 58)) or (KEY = 46)then
' Numeric value or decimal point entered
else
KEY = 0
end if
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Help with Validate FieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Aug 07 9:18 AM
Don't forget +- sometimes Sales are actually a return credit......
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Help with Validate FieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Aug 07 9:21 AM
Phone fields you actually want to
1. Trim
2. Truncate to 32 characters
3. Check for a + in the first field.....then leave the rest of the chacters (including Blanks) as is
4. Wipe out all non numerics up to an 'x' or 'X' or up to 10 numeric characters...and ignore the rest of that.

+011 649 548 237 '''leave as is, let them call Auckland any time they want
(630) 561.4444 becomes "6305614444"

(630) 561.4444 X2310 becomes "6305614444 x2310"

etc.

[Reply][Quote]
Ina Nortje
Posts: 57
 
Re: Help with Validate FieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Aug 07 9:23 AM
The + and - is relatively easy to do. Put the following line on your keypress event:

MsgBox KEY

Then type in the + and - characters to see what their key is, and allow these in addition to the ones already allowed.

However, when it comes to the scenario you created above, this becomes something quite different and would better be handled in the Validate event rather than the keypress.
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Help with Validate FieldsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Aug 07 9:59 AM
Correct, we've done this often in the past (scripted it out).

Rene's question was about Numerics only.....but the field was a Phone field.....

so that's why I put the additional stuff into it....

IMHO Rene should script this, not just search for numerics from 0-9 and +,.,- etc.

RJ Samp
[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 © 2025 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): 6/19/2025 5:00:18 PM