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.

New Record in New Table, Previous ID

Featured Replies

I would like to perform the following task:

From my main entry form while entering data into JunkTO, I want to push a button and add a new record to a history table. The current record's JunkID should be used to auto-populate the JunkID in the history table. Here's the detail...

<< Italic = field, Bold = Table, Underline = TO >>

  • JunkTO is over the table JunkTable and has a number field JunkID and a text field JunkDescription
  • JunkHistoryTO is over the table JunkHistoryTable and has a number field JunkID and a date field JunkHistoryChanged
  • The two TO's JunkID fields have an "=" relationship between them

I have tried setting up a portal field on my JunkTO main entry form exposing the JunkHistoryChanged field. However, when I edit the JunkHistoryChanged portal field the JunkID in JunkHistoryTO does not get auto-populated with the value from the JunkTO JunkID field.

I also can't seem to create a new record in the new table from the entry form I am on no matter what I try. I've been trying some scripting commands... argh.. but I am completely lost. I've created an example file with the relationship in it and attached it in case my text description isn't quite clear.

Any help is appreciated. confused.gif

JunkTest.fp7.zip

This may not be the best FMP7 method as I'm still new to that, but I did something similar.

You could make some global fields in your JunkTO for ID & Description. Make a script from that layout/TO ... set the globals to the fields on the current record. Then call a script for your history table layout.

In that script, go to the appropriate layout, do a new record request, then set all of the fields based on the globals you just set above. Finally, clear out the globals at the end of the first script.

  • Author

Thanks. I don't know if it is a best practice or not, but that worked.

I'll stick with this unless anyone else has a better suggestion.

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.