String-Handling in Dynamics NAV

Administrator
Member, Moderator, Administrator Posts: 2,506
String-Handling in Dynamics NAV
Missing the READ/DATA Option form C64? (I'Ve owned a Spectrum 48!), or want to divide Memo-Fields or Colums into Navision Fields/Tablerow's? Need to compare Meyer with Mayer (i use this for un-double my Music Inventory)? Missing left,mid,right? Want to convert 123,55 to 000012355, or convert OdD wRiTTen Text to clear Readable Text? Convert between ASCII/ANSI? Some of this Functions are allready avaible, some are new in Navision. With Example's how it works and short descriptions in the Functions. The CU is self-containing, means no interaction with any other Financials-part. Just insert, test or remove the Function, no Sidekick-effect.
Object: Codeunit 50002
Functions:
DamerauLevenshtein
min
BuildPhonetic
ReplacePart
Part
Npart
Mid
Left
Right
InsertString
ReplaceString
FormatBool
FillingZero
Title
ConvertÄÖÜ Internet
Ascii<>Ansi
WordWrap
IsChar
IsNumber
ClearString
http://www.mibuso.com/dlinfo.asp?FileID=909
Discuss this download here.
Missing the READ/DATA Option form C64? (I'Ve owned a Spectrum 48!), or want to divide Memo-Fields or Colums into Navision Fields/Tablerow's? Need to compare Meyer with Mayer (i use this for un-double my Music Inventory)? Missing left,mid,right? Want to convert 123,55 to 000012355, or convert OdD wRiTTen Text to clear Readable Text? Convert between ASCII/ANSI? Some of this Functions are allready avaible, some are new in Navision. With Example's how it works and short descriptions in the Functions. The CU is self-containing, means no interaction with any other Financials-part. Just insert, test or remove the Function, no Sidekick-effect.
Object: Codeunit 50002
Functions:
DamerauLevenshtein
min
BuildPhonetic
ReplacePart
Part
Npart
Mid
Left
Right
InsertString
ReplaceString
FormatBool
FillingZero
Title
ConvertÄÖÜ Internet
Ascii<>Ansi
WordWrap
IsChar
IsNumber
ClearString
http://www.mibuso.com/dlinfo.asp?FileID=909
Discuss this download here.
0
Comments
-
Thx for sharing,
Just a question: The ascii to ansi function, which character set (code page) in windows regional settings do you use? I'm guessing this function will only work in some countries?...0 -
You are right, the Function is designed for the Codepage 850 With German as Base-Language of Navision (depending on the STX-Content). The Function is very easy to use and translate, you need only once to determine the Special Chars from ASCII (Ansi is allways the same) for both directions translations. Maybe you will also use a text-constant instead of some Codelines. Feel free to expand. I just wanted to show a very fast and short way to translate instead of hundred Codelines.0
-
DamerauLevenshtein - determines the Difference eg. between meyer & mayer = 1, Schulz & Thöne = 5
min (resultes the smalest of 3 Values, used internal)
BuildPhonetic (Converts string to Phonetic Spelling)
ReplacePart (Search and replace a substring in a mainstring, set to local: better switch to public, is usefull)
Part (give the Nth element of a list divided by a divider)
Npart (same as part, but returns a decimal, if possbile (else 0)
Mid (works like copystr, but easyer (as possible) to use)
Left (give the left N chars of a string)
Right (give the right N chars of a string)
InsertString (inserts a Substring into Mainstring)
ReplaceString (replace a part of the mainstring with the Substring)
FormatBool (Choose the first or second String of a Comma-list, even if empty: reminds on the Navi 3.56 handling of BoolFormat)
FillingZero (converts e.g. a 123,55 to 0000012355)
Title (converts ODD WrittEN StRiNg to Odd Written String)
ConvertÄÖÜ Internet (converts e.g. ä to ä)
Ascii<>Ansi (converts betwen german Codepage ASCII and Ansi and back)
WordWrap (converts easily a long string into Table-compatible parts)
IsChar (tests, if a single char is something like abcd (true) or more 123%$§ (false))
IsNumber (same as IsChar, but results true on 0-9)
ClearString (Removes forbidden chars out of Mainstring, you can chosse some standards (as only numbers, only chars, only Uppercase), and can spell the allowed chars)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 320 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