1 Reply Latest reply on Nov 2, 2009 8:34 AM by mrvodka

    Using the backslash character

    panchristo

      Title

      Using the backslash character

      Post

      Does anyone know how can I refer to the backslash character (\) in a calculation?

      The problem is as follows:

       

      - I have a field (pathfield) with the path of a picture stored in a Directory (e.g. C:\MyDirectory\Mypicture.ext)

      - Sometimes the Picture is stored in a network directory.

      - I want to have a script which imports the picture after it calculates whether the path of the file is from a remote computer or not.

       

      So,

       

      I imagine that the script should first have a variable ($correctpath) defined from a calculation like:

       IF(Left(pathfield;2)="\\";

                          "imagewin://pathfield"             //if the path of the file is remote

                           ;"imagewin:/pathfield"  )        //if the path of the file is local

       

       And then an "Import picture" script step, with the path reference equal to the result of the $correctpath variable.

       

      My difficulty however, is in using the backslash character (\) in the calculation formula (since it is used by the pathfield), because it is not recognized.

       

      Any ideas?