Jump to content

Getting the file path and name of a container field item


This topic is 4285 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hi everyone.

I'm using the new Filemaker Pro 12 to build a product database off-line (in the office) and then exporting the date to a remote server for our on-line e-commerce system.

In the office, without internet, we want to use the Container field to store and manage images and other file types with the External container feature. When syncing the filemaker database with our website host service, we'll just upload the images in the external folder onto the server (with FTP). However I want to try and generate a file name and path with a calculation in Filemaker which will then be used as a URL in the website server.

My table would then have the following two fileds:

- Files (Container type with Data stored externally)

- URL (Calculation that would generate a url using the filename for the file in the container field)

I looked at the GET functions, but couldn't see something I could use so any help would realy be appreciated.

Thanks in advance.

Link to comment
Share on other sites

  • 4 weeks later...
  • Newbies

Here's a partial answer: to get the actual name of a contain field item, you need to use the "GetLayoutObjectAttribute" function.

This function requires that the container field be given an object name (using View->Object Info ). Then you can use

GetLayoutObjectAttribute("OBJECT_NAME_HERE";"content")

...where "OBJECT_NAME_HERE" is what you called the container field. "content" tells the function you want the name of the object in the container field. (See FMP's help function for other parameters you can use.).

Please note that the results of this calculation should not be stored--recalculate it as necessary. With my version of FMP (10 advanced), if the result is stored, I get nothing. But if it's set to recalculate as necessary, the field name appears.

Link to comment
Share on other sites

This topic is 4285 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.