replace * and ? characters in customer name

tzikitzaketzikitzake Member Posts: 13
after migrating some companies to navision, some names of customers (and vendors) have some wrong names which I correct by the Edition->replace function, but I don't know how to specify the ? or * character to replace it.

For example, I want to replace the Jh?n name by Jhon, but in Edition->replace, I can't specify the ? character to replace. I've tried with '?', "?", \?, /?...

any suggestion?

Comments

  • klavinklavin Member Posts: 117
    I once had a function to remove characters we didn't want in fields...

    If you have access to write reports, you could run it on every record by making a Char variable:
    Asterick := 42;  //Asterick '*'
    QMark := 63;  //Question Mark '?'
    
    IF STRPOS(Name,FORMAT(Asterick)) > 0 THEN
       Name := DELCHR(Name,'=',FORMAT(Asterick));
    
    IF STRPOS(Name,FORMAT(QMark)) > 0 THEN
       Name := DELCHR(Name,'=',FORMAT(QMark));
    

    I didn't test it, but you get the idea?
    -Lavin
    "Profanity is the one language all programmers know best."
  • tzikitzaketzikitzake Member Posts: 13
    thanks,

    anyway I want to replace the character, not delete it
  • klavinklavin Member Posts: 117
    ... anyway I want to replace the character, not delete it ...

    by code...
    NewString := CONVERTSTR(String, FromCharacters, ToCharacters)
    

    If in your example, 'o' is always '?' you can easily do the same using convertstr. Otherwise if it is kind of random which characters were replaced by '*'s and '?'s it needs to be done on a one by one basis.

    I'm trying to help with a solution, but as far as I know there are no wildcard escape characters from Edit > Replace.
    -Lavin
    "Profanity is the one language all programmers know best."
  • tzikitzaketzikitzake Member Posts: 13
    thanks, that way it works
  • SavatageSavatage Member Posts: 7,142
    were they really "Wrong names" or just special characters?

    There are many post about handling the import of data with special characters into Navision.

    Search for Ansi & Ascii
Sign In or Register to comment.