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.

Featured Replies

Is there a way of creating an external function to allow the user to select a text file, and have it inserted into a text field?

Unfortunately, FM8 will allow a text file to be inserted into a container, but the text cannot be manipulated once there.

Regards,

Charlie

There's a couple of ways. If it must be cross-platform you could use the Import Folder step, and choose "text files" as the type. It will read all text files of the folder into a single field. Obviously a little awkward if you only want to do one file and it's not in a folder by itself. Easiest solution to that is to use the Troi File plug-in, which can let you choose or specify a file, then read it.

On a Mac you can easily use AppleScript to tell the Finder to read the file (FileMaker itself doesn't like the "read file" command). In a Perform AppleScript step. All fields below are on the current layout, or else you need to specify which layout. _cFilePath_Mac is an unstored calculation, same for all records, in Mac syntax, ie.:

"Macintosh HD:Users:fej:Documents:FileMaker:My_FM:FM 8:8 features.fp7"

set theFile to choose file -- returns an alias

tell application "Finder" to set fileTxt to (read theFile)

set cell "FileText" of current record to fileTxt

or, with a pre-determined file:

set filePath to cell "_cFilePath_Mac" of layout "AS"

tell application "Finder" to set fileTxt to (read file theFile)

set cell "FileText" of current record to fileTxt

[Last but fast, use the shell]

set macFile to choose file

set posFile to quoted form of POSIX path of macFile

set fileTxt to (do shell script "cat " & posFile)

set cell "FileText" of current record to fileTxt

Edited by Guest
Added shell

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.