2 Replies Latest reply on Jan 27, 2011 8:35 PM by davidanders

    Storing file paths in a field for Look-Up...



      Storing file paths in a field for Look-Up...



      We have tons of scripts that contain paths like the one below that name files and store them in our server:

      "filemac:/mattpic-Public/2010/Quotes from File Maker/" & Quotes::Full Name LU & "_" & Quotes::Quotation # & "_Quotation" & ".PDF"

      This part here: <filemac:/mattpic-Public/2010/Quotes from File Maker/> always seems to be changing when we re-arrange things on our server, or perform OS updates or whatever.

      Is there a way to store this path in a field, then in 'set variable' options dialogue when I specify the value of the variable, it can 'look-up' this path?

      Here is another example of a path that always seems to change and would benefit from some sort of storage field:

      imagemac:/mattpic-Public/A-Frame Database/jpegs for quote/dust devil iso.jpg

      image:dust devil iso.jpg

      Any ideas?



      FM Pro 10.0v3, Mac OS 10.6.6

        • 1. Re: Storing file paths in a field for Look-Up...

          superficially, it's easy:

          Set Variable [$Path ; GlobalsTable::PathStart & & Quotes::Full Name LU & "_" & Quotes::Quotation # & "_Quotation" & ".PDF"]

          The key is in how you store that path so that it is universally available to you. This data can be loaded into a global field (or variable) when you first open the file (So it works in hosted systems) or you can store it in a record in a related table that uses the X operator so that it matches to every record in your main table.

          • 2. Re: Storing file paths in a field for Look-Up...
            You can create fields and a calculation field with container as the result. FMPType (filemac or filewin) - ServerName (or HDName) - FolderO1 - Folder02 - etc - FileName - FileExt ContainerCalc would concantenate these fields into a field whose result is a container field. This would allow moving from one HD or Server to another with just changing a single field (assuming the enclosing folders are the same) Error with no formatting in reply, sorry.