Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Linking A Stored File In A Container

Featured Replies

I am trying to create a link to files stored in container fields.

What I want is for the customer to see the record on the web and be able to click on the "link" to the stored file and have that start downloading.

I have worked out what the link is, if I put it in the browser it downloads everytime. I just don't want people to have to cut and paste this into the browser.

The link is stored in a calculation field in the database. I currently have this appear on the xml layout for the record.

If you need more info let me know, but I think this covers it.

Any help?

Do you already have an XSLT file for display of your record?

You can then modify it with:

Download

  • Author

I'm still not sure on this.

What should I be putting in "container"?

And

What is the Xpath? How do I work this out?

Hmm. You did not answer my question. For custom, dynamic web publishing, you need to have an XSLT file (or use PHP as an alternative). Do you have that? Then I can explain further.

  • Author

Yeah, I have created the site using the Filemaker Site Assistant.

Ok. Now in the file that should display your download file link, add the two lines I have given before at place where the link should be shown.

The XPath is a path that locates the correct element in the XML tree that is returned by the web publishing engine.

An example (for the fmresultset grammar) would be:

/fmrs:fmresultset/fmrs:resultset/fmrs:record[1]/fmrs:field[@name = 'url_calc']/fmrs:data[1]

which addresses

the first repetition (fmrs:data[1])

of the field with name url_calc (fmrs:field[@name = 'url_calc'])

of the first record (fmrs:record[1])

of the result set you got (fmrs:resultset)

within the fmrs:fmresultset root element (fmrs:fmresultset)

  • Author

So i am looking at something like this:

Download

It's still not working, i've detailed a bit more on what I am working with below:

Database Name: Results

Layout Name: Tests

Table Name: Tests

Field Name: Report (this is where the calculation is stored linking to the container field file)

Any more help you can give is much appreciated! I am new to XML and really have no idea about the language.

Looks like you have forgotten the double-quotes around the argument of the select attribute, and used the wrong field name. It should be like this:

Download

If you don't succeed, please post the file in question to this thread.

  • Newbies

I tried the solution and it is only picking up the value from the first record. Is there a way to make the code work on a list of records?

  • Newbies

I figured it out for what it is worth.

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.