Options

Escape backslash (\) from generating a new line in messages

StLiStLi Member Posts: 83
Hi,

Title basicly sais it. I'm looking for a way to print out a Filepath in a Messagebox WITHOUT having every folder on a new line... I already googled it but i only found ways how to get the exact effect i don't want... can't belive it's that hard. ](*,)

Thanks for the help in advance.

best regards, StLi

Comments

  • Options
    Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Try this:
    MESSAGE('%1','\\SERVER\DIR\FILE.TXT');
    
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Options
    StLiStLi Member Posts: 83
    Funny, this works with message(); but not with Error(); :-k

    ... well message will be sufficient.
  • Options
    geordiegeordie Member Posts: 655
    StLi wrote:
    Funny, this works with message(); but not with Error(); :-k

    ... well message will be sufficient.

    Just tried for testing purpose and both works fine (in a form, NAV 2009 R2)...where did you place them?
  • Options
    nhsejthnhsejth Member, Microsoft Employee Posts: 34
    You could use CONVERTSTR and replace the backslash character with a forward. In this case all dialogs will show the string as normal text and the path is still readable (the OS can use both characters as path separators).

    MESSAGE('%1',CONVERTSTR('\\SERVER\DIR\FILE.TXT','\','/'));
    _________________
    Niels-Henrik Sejthen
    Senior Software Developer
    Microsoft Dynamics NAV

    The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
Sign In or Register to comment.