Jump to content

This topic is 7989 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi, I'new to FM so forgive me if this is a dumb question. I have a database for my customers in which every customer is a different record which contains its basic information and a list of the products they sell and the price of them. This data is stored in two repeating fields, one for the product code and one for the price of it. I also have a database of the products in which every product is a different record that contains detailed product information and a portal that shows what customers are selling that product and the price of it. The problem is that the price is wrong, it keeps showing the price of the first product in the repeating field of my Customers database. How can I fix it?

Posted

Unfortunately, this is fixed by not using repeating fields.

Repeating fields are a legacy holdover from the Pre FileMaker 3 days, when FileMaker wasn't a relationship system. What you want to do instead is create a third file, perhaps called CustProducts.fp5, which is a join file between the customer file and the products file. Each repetition of the fields in your Customer file would become a record in CustProducts. CustProducts would have two foreign key fields, CustomerID and ProductID, and would be related to the Customer and Products files based on these fields. Customers would be related to CustProducts via the CustomerID field and you would view through a portal what you now view with repeating fields.

Basically, keep away from repeating fields for actual user data. Use relationships instead. Repeating fields should only be used for developer fields, such as holding an on and off state for a graphic, or the different levels of a progress bar.

Chuck

This topic is 7989 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.