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

File Name: Context Free Record Creation

File Submitter: Ocean West

File Submitted: 30 Dec 2011

File Category: Samples

FM Version: 11

FileMaker requires you to be on a layout or use the relationship to establish context in order to create a record in a given table.

You could us a plugin that uses SQL to create a record in a table or you can use this technique.

It's very simple.

From the Source table you export field context the primary ID field to a text file. I choose to export it to the temporary directory path.

Then you immediately import that same file in to the target table --- That is right you do not need to be on a layout that tied to the base table occurrence -- you could be on any unrelated table.

On import you adjust the field map to import the value of the text file into the foreign key field of the target table.

In this example it is a different take on a Note Log. You can type into a global field and on exit it will trigger the script to export and import that one record then clears the global field. Data entry options in the note field in the target table is defined to use the value stored in the global field.

you could choose to do things more elaborate like either exporting more columns of data by building a tab separated values to a global field and export that and import it into any table matching field names (provided your first row includes field names - and you omit them on data entry )

OR you can set variables to the desired values and then on the target table set the data entry options to the corresponding variables.

And if you choose to include data other then the ID fields you may wish to also delete the file you can do this by un checking the Specify Field checkbox on the Export Field Contents script step.

=================

Now with all this established I realized that this technique will not work on FMGo because the exporting of the file.

So there is also another script layout and table that will in essence do the same thing and it only needs to IMPORT one

record from a temp table and doesn't need to export. I actually like this method better; but kept both concepts in the

sample file for you to explore.

Cheers

Stephen

Click here to download this file

Hi Stephen,

Thanks for sharing. I like the technique a lot.

Lee

  • 11 months later...

Could be interesting; but there are two download files at the link but they are not identified in any way so you can't tell which is newest.

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.