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.

Display related records on a 2nd layout

Featured Replies

I have a State layout form which displays State records. I would like to create a 2nd form layout that displays records for Cities. The Cities need to display for the current State record that is displayed on the State layout form.

Any help will be appreciated.

- Build a relationship so each state record can see all its related city records

--- more info on this process if you need it:

----- state table has state field

----- city table has state field

----- relate the state fields to each other

- make your state layout

- make your city layout

- create a simple script that does go-to-related-record from the state to it's city collection, and which also displays the found set of related records in the city layout.

- tie your script to a button on the state layout.

Yer all set!

Regards,

Don Drake

Edited by Guest

  • Author

Thanks for the advice, however:

This works when there are related records, but does not work if related records do not exist. Is there a way to load the foreign key in a new related record and commit the related record before the "Get Related Records" code executes?

Tom,

That's one way to go. Personally, I'd probably just add a little error check to the script to make sure the relationship is turning up some related records. In the case of the error condition just toss up a dialog. Then you don't have to deal with any extra records you might create in your method.

I'm a little bit rusty on the specifics right now... maybe the IsValid calculation will work in this case or perhaps you can do GetField on the related data and see if you actually got anything.

Regards,

Don Drake

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.