Skip 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.

Embedding pdf/Word files Into ac Container

Featured Replies

My question is very simple. How, (step by step), do I embed a file into a container field. I don't wish a reference since the reference is dropped if I move the files.

Thank you in advance.

Perhaps I am not being clear. After the insert with no reference I can see an icon of the file, but how does the user open the file?

Edited by Guest

but how does the user open the file?

Try this:

Set Variable [ $where; Value:Get ( TemporaryPath )& "my.pdf" ] 

Export Field Contents [ Untitled::aContainer; “$where”; Automatically open ] 

If you attach an invisible button to the container field... could the same touch and feel as the referenced files be made!

--sd

  • Author

Thank You Oldhand; it works wonderfully.

In an effort to make the script dynamic, I created a field "gContainer" and set it = Get(Scriptparameter).

I then set the Field Contents to "gContainer".

However, the export step gives me a file error - Couldn't open the file.

Any thoughts?

Scriptparamters are only text, you need to use - combination of:

http://www.filemaker.com/help/FunctionsRef-37.html

...and:

http://www.filemaker.com/help/FunctionsRef-39.html

--sd

  • Author

Old Hand,

Thanks for your response; however I can't quite get it.

Go to Record [First]

Set Variable [$FieldValue; Value: GetField (GetScriptParameter)]

Set Variable [$Where;Value:Get(TemporaryPath) & "my.pdf"]

Export Field Contents[ What do I put here as a field or how do I make the container field, the active field? ; "$Where"; Automatically Open]

I can also get the field contents with;

Set Variable [$FieldContents; Value: GetNthRecord ($FieldValue; 1)]

I can't see how to pass the ScriptParameter to the Export Contents portion of the script.

Further help will be appreciated.

George

There are several things wrong here, your error might be caused by extention conflict, the potential field might be a word document, by you have saved it as a .pdf.

Then do you ask what to put in the first part since the focus now is a little diffuse and might have 4-5 containerfields in one record, but wish to use the same script for all of them. The answer is to leave it open and loop until the field matches the scriptparameter...


Go to Field [  ] 

Go to Next Field 

Loop 

      Exit Loop If [ Get ( ActiveFieldName ) = Get ( ScriptParameter ) ] 

      Go to Next Field 

End Loop 

Set Variable [ $where; Value:Get ( TemporaryPath ) & GetAsText ( GetField ( Get ( ScriptParameter ) ) ) ] 

Export Field Contents [ “$where”; Automatically open ] 

This means that each container field gets an invisible button attached which includes a script parameter telling where it was issued from.

Then is there the error you get, it's easiest to use the filename of the stored document hence the 3x GetSomething( , instead of calling it something general and then remember the .ext of the document in the containerfield.

--sd

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.