3 Replies Latest reply on Oct 24, 2013 1:41 PM by philmodjunk

    Container Field Calc Issue

    Robbie_1

      Title

      Container Field Calc Issue

      Post

           Hi,

           I've set up my DB to display images by going to a folder on the desktop and matching by a unique value in my DB plus ".jpg". The calculation looks like this...

                /*MAC OS X*/
                "imagemac:" & Get ( DesktopPath ) & "/DB_Images/" & unique value & ".jpg"
            
           In the past it has worked fine on multiple computers running multiple mac operating systems as long as the folder "DB_Images" lives on the desktop of the client computer, however, this time around I'm finding that it will only work on either mine or my colleagues computers and we're running the same OS. If I change the calculation to look like this (no "/" before "DB_Images"...
            
                   /*MAC OS X*/
                     "imagemac:" & Get ( DesktopPath ) & "DB_Images/" & unique value & ".jpg"
                 
                ...then it works for her, but not for her, and if I leave the "/" it works for me, but not for her.

           We are both running mountain lion Mac OSX 10.8.5.

           Can anyone help? Thanks!

           Robbie

        • 1. Re: Container Field Calc Issue
          philmodjunk

               Don't know why the first path calculation would work for anyone.

                /*MAC OS X*/
                    "imagemac:" & Get ( DesktopPath ) & "DB_Images/" & unique value & ".jpg"

                
               is the correct path as Get ( DesktopPath ) returns the / as part of the text it returns.
                
               There's a file you can download from this thread that let's you insert a file into a container field and then be able to see that actual file path inserted into the container field. It may help you diagnose what is going on here if you insert a file from each computer's desktop: Exploring the use of a $Path Variable in Scripts
          • 2. Re: Container Field Calc Issue
            Robbie_1

                 Thanks for the response, I took a look a the post and read over the db in the thread. I ended up with the calc...

                 "imagemac:"& Get (DesktopPath ) & "DB_Images/" & unique value & ".jpg"

                 which works great so far on both computers, so it must have been something with the "/*MAC OS X*/" starting line. 

                 Thanks so much for the input!

            • 3. Re: Container Field Calc Issue
              philmodjunk

                   /*MAC OS X*/"

                   Is enclosed in comment brackets /* */ so that text should be ignored.