printing the '\' character

lgoodinlgoodin Member Posts: 6
edited 2005-08-03 in Navision Attain
How do you print the '\' character in Navision without it going to the next line. An example would be if I wanted to give a message that a file has been manipulated or moved after processing and wanted to print the name of the file such as message('c:\temp\test.txt' + 'has been moved to c:\test').

Comments

  • WaldoWaldo Member Posts: 3,412
    You can do this by using %1 and such ... see the example:
    //"path" is a variable of text
    path := 'c:\temp';
    MESSAGE('%1', path);
    
    Off course, this also works:
    backslash := '\';
    MESSAGE('c:%1temp%1waldo', backslash);
    

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • HansSoloHansSolo Member Posts: 15
    Has anyone got this to work in a confirm message? I've tried everything and no luck yet.

    thanks in advance.
  • RobertMoRobertMo Member Posts: 484
    Try this:
    IF CONFIRM('a\b%1c',TRUE,'\') THEN;
    

    Result:

    Microsoft Navision Attain
    a
    b\c
    Yes No
               ®obi           
    ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
  • Mark_SMark_S Member Posts: 17
    indeed, works nice, i wanted to get a dir\file name on my cofirm box .. i used:
    Text0004 := "Are you sure you want to delete:\%1?";
    IF CONFIRM(Text0004, FALSE, RecWordDocs.DocName) THEN
    

    i got:

    Microsoft Navision Attain
    Are you sure you want to delete:
    N:\NAVISION\DOCUMENTEN\FRIJTRIJSB\2004\PRIJSAFSPRAAK\1.DOC?
    Yes No
    M Stunnenberg
    GAC Business Solutions B.V.
Sign In or Register to comment.