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.

relative path to data in container fields?

Featured Replies

hi all,

 

i have a straightforward file that points to some audio files (1 per record). i have it set up like this:

 

Main folder

-- audiofiles.fp7

-- Audio Folder (contains all the audio files)

 

i have imported all the audio files files with the import folder command. along with some text fields, the data file contains a playback button to preview the audio. works fine so far.

 

when i copy the main folder with everything to another machine, the links break (no audio is played back). something seems to still be in the container field, however, because double clicking does not do anything, where on a new record it puts up the 'record sound' dialog. also navigating to the record from a portal takes quite a bit of time compared to navigating to a record with no reference, but that's the same on the original set of files.

 

so the question is if container files expect the *absolute path* to be the same. if so, is there anything i can do short of performing the same procedure on the other machine over again?

 

thanks,

stefan

Solved by comment

Go to solution

Hi Stefan,

 

container fields and references always mean trouble. ;)

 

Maybe I can suggest a completely other approach: Use a local webviewer to play the audio, it's quite simple and since HTML5 quite easy.

 

Let me know, I can give you some input if interested.

 

Best,

Alexander

something seems to still be in the container field, however

 

Yes, the container field still contains the path (or paths) to the original file. You can see exactly what it is by looking at =

 

GetAsText ( YourContainerField )
 

You can also replace a part of the path by a simple text manipulation of the container field e.g. by using Substitute(). Another option is to use a global text field for the path to the folder and a local text field for the file name - then make the container field calculate the entire path.

 

 

 

 

 

container fields and references always mean trouble. ;)

 

No, not always. Not even most of the time.

  • Author

Hi Stefan,

 

container fields and references always mean trouble. ;)

 

Maybe I can suggest a completely other approach: Use a local webviewer to play the audio, it's quite simple and since HTML5 quite easy.

 

Let me know, I can give you some input if interested.

 

Best,

Alexander

hi alexander,

 

thanks for the tip - i'm afraid my HTML knowledge is frozen in 4 transitional :getlost:

 

did you mean a web viewer from inside FM or a web page without FM? i haven't used the web viewer features for anything besides checking them out.

 

stefan

  • Author

 

Yes, the container field still contains the path (or paths) to the original file. You can see exactly what it is by looking at =

 

GetAsText ( YourContainerField )
 

You can also replace a part of the path by a simple text manipulation of the container field e.g. by using Substitute(). Another option is to use a global text field for the path to the folder and a local text field for the file name - then make the container field calculate the entire path.

didn't know about displaying the content as text - that's pretty cool. when i tried, the result was surprising, it said:

 

size:0,0

movie:<filename>

moviemac:/discname/path_to_audio_folder/filename

 

i find it surprising, because the filename appears twice and it works even if i remove the first two lines altogether. what are they for?

 

i tried what you suggested with the calc field and that works well. the only problem is that sending the files to someone else requires them to supply the proper path to be used in the calculation and not everyone understands as much as 'file path'.

 

thanks,

stefan

  • Solution

the filename appears twice and it works even if i remove the first two lines altogether. what are they for?

 

One is a relative path to the file, the other an absolute one. Filemaker will try all the supplied paths in succession and use the first one that turns out to be valid.

 

 

the only problem is that sending the files to someone else requires them to supply the proper path

 

Unless you use a relative path and take steps to control the installation. You should also explore the new container field features of version 12.

  • Author

One is a relative path to the file, the other an absolute one. Filemaker will try all the supplied paths in succession and use the first one that turns out to be valid.

 

that's perfect - i was hoping to use a relative path. now i don't even need to know what the drive of another user looks like, as long as he doesn't mess around with the files within the folder, all is set.

 

thanks much!

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.