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.

Featured Replies

  • Newbies

Hi all,

 

I'm fairly new to FM after only using FM PR012 for a short time now However I have managed to get past the basics OK but I'm having a hard time learning script steps.

 

Question: I really want to learn more about script steps etc but I'm not having much luck finding books that go in to detail about the correct way to write scripts.  

 

I welcome all comments 

Consider getting hold of a general introduction into programming. FileMaker scripting/calculations don't live in a vacuum, so many techniques, conventions and best practices from other environments and languages also apply and/or are worth considering. 

  • Author
  • Newbies

Thanks for the advise and I will study at the Filemaker website more closely.

 

I do however, have a problem that I just can't get my head around. I have three related tables, they are:-

 

CustomerDetails - OrderForm - OrderDetails.

 

What I have been trying to do is pull the customers details into the "OrderForm" via a drop down list then auto look-up a matched field "CustomerFullName" to the OrderDetails layout. I have now decided to remove the "OrderDetails" and use this instead of the "CustomerDetails" table. But I'm still having trouble trying to automatically pull the details from a matched related field to the "OrderForm".

 

Hope this makes sense.

If you have these tables 

 

Customer --< Orders --< LineItems

 

you need

 

• a primaryID in Customers

• a primaryID, and a foreignID for Customer in Orders

• a primaryID, and a primaryID for Orders in LineItems 

 

Create a relationship Customers::_pk_customerID = Orders::_fk_customerID.

 

Use a value list defined as Customers::_pk_customerID as the 1st, and Customers::name as the 2nd field, and use it to format the foreignID field on your Orders layout. When you have inserted a customerID into the foreign ID field, you can display the customer's details, simply by placing fields from the related Customers table on the order form layout.

 

I have now decided to remove the "OrderDetails" and use this instead of the "CustomerDetails" table […] Hope this makes sense.    

 

No.  :laugh: If your orders consist of more than one product, you need a LineItems table (aka Order Details). Also, this has nothing to do with being able to display the customer name on an order.

 

Also, when you say “pull”, you hopefully don't mean “copy” – as emphasised above, don't copy data from related tables – reference and display it.

 

 

Also, when you say “pull”, you hopefully don't mean “copy” – as emphasised above, don't copy data from related tables – reference and display it.

 

With a couple of nuances:

 

You typically want your invoice to display the customer's information AT THE TIME of the order/invoice,  not the most current information.  In case they move, change legal name,...

 

Same applies to product prices.  You do bring the product price over to the order line items to capture it at the time of the order.  Otherwise, when the product price changes all of your old orders will now show the new price and not the price at the time of the order.

  • Author
  • Newbies

With a couple of nuances:

You typically want your invoice to display the customer's information AT THE TIME of the order/invoice, not the most current information. In case they move, change legal name,...

Same applies to product prices. You do bring the product price over to the order line items to capture it at the time of the order. Otherwise, when the product price changes all of your old orders will now show the new price and not the price at the time of the order.

Yes, you are on the same track as me. I must admit that when I started this project, I did not realising how complicated it might get!

My thinking is - yes I could use a portal but due to very long list of options and upgrades for each product item I'm faced with, a portal was (as far as I could see), out of the question. So. I'm trying to retain the customers ID and/or full name in the orderdetail layout when each record is saved, which will be my line items. And you are correct in your comments (above), that's what I have also tried achieve, that's why I was looking at the option of a look-up field.

Typically the selection / creation of line items (order items...) can be scripted so that you do not have to rely on burying business logic in the field schema.  Auto-enter and lookup settings are on the field level and generally it's better to avoid that and take explicit control over what gets set when.  With auto-enter and lookups you do not always have that same control.

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.