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...).
-Mirko-
"Never memorize what you can easily find in a book".....Or Mibuso My Blog
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.
Comments
otherwise, you can loop every char of the string and check if it's a number (there are some topics in mibuso about it...).
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
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.
What about this?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
but you obviously need something else: so, what do you really need to do?what's the business need?
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Good question. :thumbsup:
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
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.
Did you try this?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
or easier
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Thanks for your promt reply....
This code has worked....................................
if evaluate(myintegerfield,mycodefield) then
// do something, a MODIFY, for example;