Skip 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.

Creating new record between related dbs

Featured Replies

contacts.db and orders.db have a relationship with the field contact as the key.

HOw can i create a script/button in contacts.db that will take the current record details from conatcts.db , create a new record in orders.db and leave me with that db in the foreground with the related info?

Always use a unique ContactID field (usually a serial number) in relationships ...

For your question:

You should already have a relationship linking ContactID in Orders to ContactID in Contacts, so that all the contact's details are filled in automatically, using a lookup

Create an All-to-All relationship (joining two calc fields = 1 on both sides) between Contacts and Orders

Create a gID global text field in Orders

Scripts:

Set field (All::gID, ContactID)

Perform script in Orders (see below):

New Record

Set field (ContactID, gID)

Go to Layout (a layout with the info you want)

make sure that you have check the create a new record in the relationship dialog box

  • Author

can you tell me more in laymen terms on this bit:

using a lookup Create an All-to-All relationship

how is this done?

(joining two calc fields = 1 on both sides) between Contacts and Orders Create a gID global text field in Orders Scripts: Set field (All::gID, ContactID) Perform script in Orders (see below): New Record Set field (ContactID, gID)

need a guided step on this!!

Go to Layout (a layout with the info you want) "

Maybe I'll run through my issue again:

I have 2 dbs; contacts.db and orders.db they have a relationship defined on the main contact field. The contact field in the orders.db is a value list defined from the contact field in contacts.db with other related data looked up. What I want to achieve is when a user has found the contact they want in contacts.db, have a button there that when clicked opens the orders.db, creates a new record with the contact field and other related data autofilled. How would I achieve this?

Cheers

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.