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.

problem with relationship

Featured Replies

I'm having a problem with a relationship. I have a layout with some info about hotels and a button that goes to the another layout that shows pictures of that hotel. I made a relationship between them with an ID field, and it work perfectly beside one thing. If I create a new record in the hotel table, it doesn't create a new one in the picture table, even though I selected "Allow creation of records in this table via this relationship". Does anybody know why this won't work? Thanks in advance

Selecting the 'allow creation' box is quite misleading for beginners. There are lots of people who think it does what you thought it did.

Unfortunately that is not the case. What it means is that you can create records in a portal and it allows a blank line for that purpose if the box is checked.

What you need to do is script a new record creation so that it creates the child record at the same time.

The script would be along these lines (assuming that you start from the layout for the hotel (not the pictures) and also assuming that your main records are set up for an auto enter keyID field

Create new record

Set variable to record ID

go to a layout that is set up to show records from the related file

Create new record.

Set key_id field to your variable

Go to original layout

attach this script to a button on your main layout and it will create related records in both tables

HTH

Phil

  • Author

eheh thanks a lot! It's working now :

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.