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.

add record to second database simultaneously

Featured Replies

This should be an easy one for the Gurus:

I have two simple databases:

DB1 is a simple call log for a tech support team.

DB2 is a simple knowledge base.

I need to have the option to create a new record in DB2 from some of the fields in DB1 by using a simple switch in DB1 such as "Add record to DB2: Yes/No"

I'm a graphics/CAD guy but I get very turned around with databases. Any help would be greatly appreciated.

Thanks,

Dave

www.daviator.com

Duplicate post -- see Scriptmaker forum.

  • Author

That's because I thought it covers two areas of the forum. Besides, there was no answer here so I thought I'd post it there. If you look at the time stamps, they're hours apart.

Who are you? The FM Forum police?:? I've seen your postings before. You're the guy who tells the newbies that their stupid but never answers the questions.

Why don't you just help or leave?

[ December 07, 2001: Message edited by: daviator ]

He was just trying to clean up the message boards. Someone who is looking for help should be more polite...but then again what do I know, I'm just Canadian tongue.gif" border="0

Here's a quick and probably ugly fix to your problem.

Create a global number field in File B and set it to 1. Create a number field in File A that is preset to 0. In File B create a relationship between these fields. On the layout that you enter the info, include a button with the caption "Update File B." This button will be attatched to a script that will set the number field to 1, perform an external script in File B, and then set the number back to 0. In File B the script should create a new record, and set all the fields using the relationship.

Set Field[ "Txt Field" , "File A::Txt Field" ]

  • Author

Thanks FUBAR. I'll give that a shot.

I didn't mean to be impolite but Vaughan seems to just do that...clean up the message boards. Since my issue could possibly overlap two areas, relationships and scripts, I posted in both areas. Not 3 or 4, just 2.

Answering my post with a note that I posted twice is not helpful, that seems to "dirty" a board more than two posts.

I answer dozens of posts and emails on 3-4 hobby websites (including my own website) weekly. I never feel the need to be condescending even when I see the same posts on multiple sites.

F.Y.I. I love Canada smile.gif" border="0

Thanks again!

Dave Eckert

www.daviator.com

[ December 07, 2001: Message edited by: daviator ]

  • Author

Thanks FUBAR!

I got it working now. It will create dupes but I'll figure that one out on my own.

Thanks again!

Dave

  • Author

To FUBAR,

A couple of follow up questions if I may:

How do I Set a Global Field to 1?

How do I perform an external script?

How do I set all the fields using the relationship with a script?

Sorry, I'm new to this and am just trying understand what I'm doing to not only make it work but have the knowledge myself.

Thanks again!

Dave

1. Either create a layout and put the global field on the layout and set it to 1 (only have to do this to one record since its a global field) or use the script step "Set Field"

---> Set Field[ gFlag , 1 ]

2. Use the script step "Perform Script" then chose "External Script" then choose the second database, then choose the script you want to run.

3. Create a script that creates a new record and sets the fields with something similar too...

---> Set Field[ "Name" , "File A::Name" ]

---> Set Field[ "City" , "File A::City" ]

etc. etc.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.