COPYSTR seems not working properly
txeriff
Member Posts: 515
Hi all,
I hope someone can help.
As you can see in the following image, copystr is not copying the string I´m trying to ("2" value from operationid)

The redbox is the value that shouldn´t come.
by the way, starting pos is 19 and ending pos is 24. That makes 5 lenght string. So if we start counting from the double dots after operationID, it seems OK.
I do +2 and -2 in copystr to prevent from copying double dots and empty space, and the same. I tried no to adding +2/-2 but same happens.
Thanks a lot for your responses =P~
EDIT:
Please delete this post, is embarrasing. I spent a lot of time with strings, slice and dice... copye from here to there and braiwashed.
I didnt notice the last parameter for strcopy is for str lenght, not for strpos.
I hope someone can help.
As you can see in the following image, copystr is not copying the string I´m trying to ("2" value from operationid)

The redbox is the value that shouldn´t come.
by the way, starting pos is 19 and ending pos is 24. That makes 5 lenght string. So if we start counting from the double dots after operationID, it seems OK.
I do +2 and -2 in copystr to prevent from copying double dots and empty space, and the same. I tried no to adding +2/-2 but same happens.
Thanks a lot for your responses =P~
EDIT:
Please delete this post, is embarrasing. I spent a lot of time with strings, slice and dice... copye from here to there and braiwashed.
I didnt notice the last parameter for strcopy is for str lenght, not for strpos.
0
Comments
-
The last parameter for CopySTR should not be the end position, but the length to grab, starting from the start position
NewString := COPYSTR(String, Position [, Length])
0
Categories
- All Categories
- 75 General
- 75 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions