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.

Best way to make this work?

Featured Replies

So I have 2 tables: Customers & Jobs

On the Jobs layout, I have a drop down list of Customers, so I can select which customer the job is for. What I would like to do is be able to type in a NEW customer in the Jobs layout, in the Customer field, and since the customer's name is not in the drop down list, it would create a new record in the Customer's table with the name .

Am I overthinking this one? Thanks...

In the relationship dialog, check the "allow creation of records in this table via this relationship" box on the Customers side.

JT,

May I suggest that new jobs are created from a Customer Form layout. This way, a user can find in Customers, add New if necessary, and then click "New Job." I typically have a portal of jobs on a customer form and an "Add New" button above the portal. Each portal row has a "view" which does a gtrr.

hth,

Barbara

There are times it is helpful to create a parent from a child table (customer from an Invoice or jobs) but keep in mind that you are removing the expectation that the User fill in all the Customer fields by allowing them to enter just a 'name'. If you instead open a popup window for a new customer, or switch to invisible tab with customer details then the User can see (and fill in) all required information.

Nonetheless, there has been times when a single entry into a related field is fine so here is one way (attached). Since you are using drop-down, you will need two fields anyway (one which holds the CustomerID with the drop-down attached and the other which holds the customer name), so you can use these two fields (stacked) to accomplish what you wish. Brief description:

Drop-down is popped open then if User doesn't make a selection within two seconds, it drops them into the Customer Name field underneath. In graph, Customers has 'allow creation' turned on. When User types into the empty customer name field, it inserts the CustomerID into your Jobs CustomerID and leaves the name displayed.

If you can live with the timer then it might work for you.

NewCustomer.zip

Thanks for the sample file.

This creation of parent records has been an issue for me for years. I've see quite a few techniques but none have been "perfect", they've always had some kind of "hack" feel to them.

I've done one solution that I fear will come back to bite me some day. It uses a pop-up menu with a numeric primary key for the customer. The pop-up menu is set to allow entry of other values, which when selected makes FMP display a text dialog natively. Users enter the new Customer name. A script trigger on the field object then checks whether the entry is a valid primary key, and if not creates a new related record, sets the customer name and replaces the customer name with the new pk.

Still a bit hacky but it has been working in production for a couple of years now.. :D

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.