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.

Script to add new record to related table

Featured Replies

I have two related tables, one to many.

NAMES, made up of:

name

home_address

nameID

PLACES, made up of:

Place

nameID

The layout shows one Name and through a portal shows many Places.

How do I write a button script that adds a new record in PLACES and then inserts names:home_address in places:place and name:nameID into places:nameID

Thanks

How do I write a button script that adds a new record in PLACES and then inserts names:home_address in places:place and name:nameID into places:nameID

Try (from button on Names layout):P

Freeze Window

Set Variable [ $nameID ; Names::NameID ]

Go To Layout [ layout based upon Places ]

New Record/Request

Set Field [ Places::NameID ; $nameID ]

Set Field [ Places::place ; Names::home_address ]

Go To Layout [ Original Layout ]

Planting the Names::home_address into standard field in Places may not be necessary. I do not understand the relationship between the two tables nor your solution but the Places::Place field may not be necessary ... you can simply place the Names fields directly onto your Places layout. It is only necessary to plant as standard data if it is required for historical purpose, ie, the Names::home_address can change but you need to keep the Places::place the value it was at the time the record was created.

Edited by Guest
Changed sentence

  • Author

Thanks LaRetta

That works fine

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.