Options

COPYSTR seems not working properly

txerifftxeriff Member Posts: 492
edited 2014-12-02 in NAV Three Tier
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)
2dloz0h.jpg

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.

Comments

  • Options
    MBergerMBerger Member Posts: 413
    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])
    
Sign In or Register to comment.