changing character on a string

fmhiguefmhigue Member Posts: 290
I got the following string (It can change)
|850206|94155|850206

I want to change it to <>850206&<>94155&<>850206. how can i do it?
I want to use that value to filter customer different that the string.

Thank you in advance

Comments

  • matttraxmatttrax Member Posts: 2,309
    i Integer
    NewString Text
    FOR i := 1 TO STRLEN(String) BEGIN
      IF String[i] = '|' THEN
        NewString := NewString + '&<>'
      ELSE
        NewString := NewString + String[i];
    END;
    

    Or something similar, can't remember the exact syntax of a FOR loop in Navision as I rarely use them. You'll have to change it up a little bit to suit your needs.
  • XypherXypher Member Posts: 297
    myStr := CONVERTSTR(myStr,'|','&<>');
    
    DELCHR(myStr,'<','&');
    
Sign In or Register to comment.