8 Replies Latest reply on Jan 25, 2011 7:54 AM by Sorbsbuster

    Alias Pointer in Container Field



      Alias Pointer in Container Field


      Is there anyway that I can get the Alias address ("Macintosh HD/home/Desktop/demo.pdf" for example) that is in the container field, when a file is inserted, to ignore the name of the root drive? aka so it just looks for ("/home/Desktop/demo.pdf"). Is there a script that can do that? Or is there some other way? Thanks.

        • 1. Re: Alias Pointer in Container Field

          No and yes :-| There's no way to tell the container data to ignore the root drive's name (or any part of the path). There is a way to create a calculation field (result Container) which could restructure the path dynamically for each person's client machine. It would look and work much the same as the original editable regular Container field, but cannot be entered. 

          The calculation field can be placed on top of the original, with its enterable settings unchecked (in Layout mode). So that the original is still enterable, but the calculated image/file is what the user sees.

          But what is the situation where this is needed? It's hard to give people solutions to "container" questions unless you know something about the environment and proposed use.

          • 2. Re: Alias Pointer in Container Field

            I have a database on my server, with a couple of employees using FM Pro to access this database. The root volume's name on the database is called "Macintosh HD2" - where it varies for my employees (some call theirs "Macintosh HD", or "HD" or "Root" etc). In that root we have a folder that contains all of the company's documents that everybody has a copy of on their machine. So say the folder "Comp_Doc" is identical on everybody's machine - I'd like for when people use the database - they can click on the container field (which has a file from this folder in their root) and it should be able to open up on their machine, despite the name of their root drive. Also, is there any way they can quick look a file? Thanks

            • 3. Re: Alias Pointer in Container Field

              I guess there's 2 ways to store often-used files, network vs local. It seems you're talking about a distributed copy, local to each machine. It seems to me that it would be kind of a PITA to keep these folders "up-to-date", but maybe that doesn't matter in this case.

              So, the solution to the above situation is the calculation field I suggested. It is very easy for FileMaker to calculate a known path. It has: Get (DesktopPath) and Get(DocumentsPath). Both start with that machine's path to the current user's Desktop or Documents folder. Using that as the first part of the path allows you to go down from there, on a known folder path. They just have to put the folder where you've decided. Example of calculation for a "local" file (using a calculation field "_cFileName" for any additional folder & the file name).

              Case ( Abs ( Get ( SystemPlatform )) = 1; "filemac:"; "filewin:" ) & Get ( DesktopPath ) & _cFileName

              Another path it knows is its own, Get (FileMakerPath), which is the FileMaker application's path.

              • 4. Re: Alias Pointer in Container Field

                Well in my case its in the root "/" of the drive - so I noticed theres no GetRootPath, the desktop and documents path are "too far down the line" - so to speak. How could I refer to the root? Thanks for helping btw

                • 5. Re: Alias Pointer in Container Field

                  Get (DriveName) is the root drive of the machine running that copy of FileMaker.

                  • 6. Re: Alias Pointer in Container Field

                    Why not just slap some wrists and make everyone (do the Mac equivalent of the Windows) map the folder as a drive? Problem gone, surely?  I use that shared Container Field contents all the time like that.

                    The other way you could try is to store the linked contents in a folder that is in the same folder as the database itself (only a relative path needed, then) - but that's ugly.

                    • 7. Re: Alias Pointer in Container Field

                      Well thats a valid solution while one is in the office - but we like to keep copies of our root working directory on our machines while we're on the road for reference. So, I know what you're saying - but we kinda all need that folder on our machines. Thanks for the tip though - you know anything about quick looking files in a container field (a mac utility) like you can do in Bento?

                      • 8. Re: Alias Pointer in Container Field

                        I find the sync-ing bit intriguing.  You have a folder on your network with files in it, that's used when staff are in the office?  Then folders on each user's laptop, for use when they are on the road?  Or they only ever use the folder on their HD, even if they're in the office?  How do they take a copy of the folder when they leave to go on the road?  Do they ever update the contents of the folder and have to sync it back to the network copy?

                        Maybe there's an answer where each user has exactly the same path to the folder they are using on their HD (just impose the discipline suggested above, just not on a network drive.  In Windows, there is nothing to stop you mapping a local folder to be a mapped drive, so I'm sure Mac does the same thing.)  Everyone therefore maps to exactly the same path name, but they each have local versions of its final destination.  Then, set all of those folders to synchronise using Dropbox (for example), so when it's time to go the user can just unplug-and-go.

                        Maybe that's just exactly what you described to me in the first place.  And, of course, I'm ignoring all the inherent problems of synchronising files and referenced documents no matter how you do it.