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.

Write to file container, only reference

Featured Replies

Situation:

I'm calling an applescript to create and save a new Word Document with a calculated filename.

Now I would like to store this file (just the reference) directly to FM into a Container field.

Problem:

First I tried with FM script "Insert File" but I don't know how to define the source File, because the filename is based on a calculation

Second thought was to store the reference with applescript but there is the same problem.

any ideas?

by

ChiSao

  • Author

I tried GetAsText(container) to export the path but I cant reimport this path into the container field. It doesn't work

So is there really no possibility to write a reference into a container field? I can't believe this.

Otherwise I have to use a normal field to store the path and a script trigger to open an apple scipt to open the file with an externel program (Word, Acrobat and so on)

(much more complicated than the container field)

FIleMaker paths are not OS paths. I think you have to transform the path in your AppleScript from the FM path to a Mac OS path.

I don't know this by head, but if you do some research you will find the way.

I tried GetAsText(container) to export the path but I cant reimport this path into the container field. It doesn't work

Take one of the paths you get with GetAsText(container) (a relative or an absolute one) and use Set Field[container, thePath] where thePath is the text path in the correct format. You are assigning a bit of text to the container, but that's ok. It will work out.

  • 2 weeks later...
  • Author

So finally I found the solution.

When writing a path to a container field it's important to have a "space" a the end of the path like:

"filemac:/Macintosh HD/word.doc "

the empty space after doc is important.

Does someone know why?

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.