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.

Adding records from one DB to another

Featured Replies

  • Newbies

I'll try and keep it brief.

I have a 'Database' and a button on that database that once clicked then writes a record in another database named 'Reports'. So far i've managed the script to take the name and email address fields and the title of the button in question being clicked and write the info into a new record in the 'Reports' database.

This all works and launches the 'Reports' database and then puts a cursor into a 'Comments' field in the 'Report' database to add a couple of lines of text pertaining to that record entry.

Issue 1:

After i've entered the couple of lines of text into the 'Comments' box i want to hit the continue button on the script to confirm i'm finished and then have it switch to the 'Database' window. For literally a flash of a second it does and the switches back to the 'Reports' window.

Issue 2:

I want the text i've entered into the 'Comments' to then post into the 'Database' in the relevant/active record but i've been unable to achieve this and i would love some suggestions as to how i can achieve it.

Welcome to the forums!

Don't feel that you need to simplify your questions or keep it brief. The more info that you provide, the better the responses will be.

Do you have one FM file with two tables? What are the table names?

If you have a parent record and you wish to create child records, you'd write a script and assign the script to a button. The script would capture the parent's primary key into a variable, go to a child layout, new record, set the foreign parent key to the $var.

By doing this, you've related the two records.

In your case, you might like to use a popup window and pause, so that the user can enter a comment. Then the user clicks Cancel or Done. The window to the child record closes.

See Demo

NotePopup.fp7.zip

  • Author
  • Newbies

That's exactly what i'm trying to achieve. I'm using to separate DBs and don't have the first clue where to start in achieving this.

I see that yours launches a new window but you only have one Database - i'm presuming this is because you have two Tables defined?

I have a second database as it is acting as a reporting system.

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.