Space at end of text field

jwilder
Member Posts: 263
I have created a table that I use to run against the Ship-To Address field to see if there is a PO Box in the address. The table has one field which is Text50. The table has values in it such as P O, P.O., PO BOX etc...
I am shocked to see that I cannot enter a space at the end of the text. For example I want P O (with a space at the end). But NAV is removing the trailing space. I can have a space at the begging just not at the end. I would expect leading and trailing spaces to be removed for a Code field but not text. Anyone have a way around this?
I am using NAV 2009 R2 Classic.
I am shocked to see that I cannot enter a space at the end of the text. For example I want P O (with a space at the end). But NAV is removing the trailing space. I can have a space at the begging just not at the end. I would expect leading and trailing spaces to be removed for a Code field but not text. Anyone have a way around this?
I am using NAV 2009 R2 Classic.
Jason Wilder
jwilder@stonewallkitchen.com
jwilder@stonewallkitchen.com
0
Comments
-
Hi Jwilder
How you reading the file?
FileTest.OPEN ('c:\temp\PO.txt');
// FileTest is File Type
FileTest.CREATEINSTREAM (StreamInTest);
//streamInTest is InStream Type
WHILE StreamInTest.EOS () = FALSE DO
BEGIN
StreamInTest.READTEXT (Txt,100);
MESSAGE ('(%1) strlen = %2', Txt, STRLEN (Txt));
END;
Result
(P O ) strlen = 4
Hope this helps!Big D signing off!0 -
I am not reading a file. I am looping through this table and checking it against the "sales header"."ship-to address" field to see if it contains that value.
My question was how to enter a text value in a table in NAV with a space at the end.
I have found a work around for now. I added a button that takes the value through code and adds a space (like this: value := value + ' ';). It works but still don't understand why a user can't enter a space at the end.Jason Wilder
jwilder@stonewallkitchen.com0 -
HI,
i have try With creating new field Text [30], its working fine for ur Query.
Have you check after with creating new field for Test purpose.
thank You0
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