Search Alphanumeric
hardik_shah
Member Posts: 219
Dear All,
Need Help.....
Can anyone let me know how to findout That String contains other than numeric ? ? ?
Need Help.....
Can anyone let me know how to findout That String contains other than numeric ? ? ?
0
Comments
-
try to evaluate the string in an integer, if it fails, it contains "other than numeric characters" (ok, 88888888888888888888888888888888888888888 will fail as well because of overflow...keep this in mind).
otherwise, you can loop every char of the string and check if it's a number (there are some topics in mibuso about it...).0 -
try
str := 'ABC12AV'; Str2 := DELCHR(Str,'=','0|1|2|3|4|5|6|7|8|9'); Message('%1',Str2);0 -
Thanks for your swift reply...
Kindly find the below scenario.
AlphaNumeric(String : Code[20]) : Boolean
For IntLoop:=1 to STRLEN(String) DO BEGIN
Char:=COPYSTR(String,IntLoop,1)
If Char='[A..Z]' Then BEGIN
MESSAGE('Coming');
EXIT(TRUE)
END
END
EXIT(FALSE)
I passed Parameter to this function 'E678-A'.
But it not printing the message.
I am not sure how to compare If Char='[A..Z]' Then BEGIN
Please help me.0 -
mohana_cse06 wrote:try
str := 'ABC12AV'; Str2 := DELCHR(Str,'=','0|1|2|3|4|5|6|7|8|9'); Message('%1',Str2);
What about this?0 -
your original question was:
and you got 3 answers.Can anyone let me know how to findout That String contains other than numeric ? ? ?
but you obviously need something else: so, what do you really need to do?what's the business need?0 -
Belias wrote:your original question was:
and you got 3 answers.Can anyone let me know how to findout That String contains other than numeric ? ? ?
but you obviously need something else: so, what do you really need to do?what's the business need?
Good question. :thumbsup:0 -
Business Need is following
I have one field and data type is COde. This field contain AlphaNumeric data in some records and contain Pure numeric data in some records.
What will be Navision coding to find out that field has Numeric value or AlphaNumeric value.
Because I want to dump only numeric records into some other field of Integer data Type.
When I am Dumping Alphanumeric data into Integer data type fields is giving run time error.
Need help.0 -
mohana_cse06 wrote:mohana_cse06 wrote:try
str := 'ABC12AV'; Str2 := DELCHR(Str,'=','0|1|2|3|4|5|6|7|8|9'); Message('%1',Str2);
What about this?
Did you try this?0 -
mohana_cse06 wrote:try
str := 'ABC12AV'; Str2 := DELCHR(Str,'=','0|1|2|3|4|5|6|7|8|9'); Message('%1',Str2);
or easiermyintegerfield := 0; if evaluate(myintegerfield,mycodefield) then // do something, a MODIFY, for example;
0 -
Hi,
Thanks for your promt reply....
This code has worked....................................
if evaluate(myintegerfield,mycodefield) then
// do something, a MODIFY, for example;0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
