Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted (edited)

Hi all,

been lurking here for a bit, haven't been doing much in Filemaker apart from maintaining my v5 databases making sure they run on 8.

I've now decided to port some stuff to 8 and have run into a brick wall. For the life of me I can figure out how to set up relationships in 8 to do what I want. I've tried setting them up the way they in v5 but had no luck, I'm now starting to question my sanity.

I'd love for someone to have a look my files and tell me where I'm going wrong. What I have is a set of three (stripped down) files, one Suppliers, one Stock details and one Purchase orders. In purchase orders, once a Supplier has been selected only the items available from that supplier show in the item pop up. The recreate file is my fruitless effort of re doing this in one file. While it's true that I can just keep on using the old files I'd love to have this in just one database, moreover, I'd like to understand where I went wrong in my efforts. I've tried so many different ways that I lost count of what is going on.

The files are here: deleted, see new file below

I appreciate any help.

cheers

michael

Edited by Guest
Posted (edited)

Well, I managed to do it, but not really understanding why and how.

Bought the Bible and the Missing Manual yesterday, looks like I'll have some studying to do.

I'd really appreciate if anyone could have a look at the new working file and let me know how this could be improved in terms of relationships.

thanks

New_Purchase_Orders.fp7.zip

Edited by Guest
Posted

Hi michael,

I noticed right away that you seem to be missing a line item table. You're using "Item 1", "Item 2", etc., which will give you problems down the road. Whenever you have a situation where you need to have several items of the same type (especially when the max number of these is unknown,) it is a good candidate for a related table.

Attached is an ER diagram showing a typical PO structure. Note that an ER diagram is not the same as FileMaker's relationship graph. The underlined field names are the primary keys. The foreign keys are implied by the relationship lines.

For FileMaker's relationship graph, you would need two occurences of one of the tables because a loop is not allowed. I would probably make two instances of the Vendor table, one related to PO by Vendor ID, and one related to Product by Vendor ID. To make the value list of products for the selected Vendor, you would then need an additional table occurence of Product off the Vendor by PO table occurence.

PO2.GIF

Posted

Hi Ender,

thanks for the reply.

I've tried setting up a new file with the info you sent but failed to get it work.

Since the number of line items is limited in this case I might stick with what I've got working now and leave your solution for a later date when my head is a little clearer.

thanks

michael

Posted

"Since the number of line items is limited in this case I might stick with what I've got working now..."

Bad idea Michael. It'll end in tears.

Posted

To make the value list of products for the selected Vendor, you would then need an additional table occurence of Product off the Vendor by PO table occurence.

I think I got the first part right, see file, but am totally confused by the last part.

Also, where do I get my line items from in the PO file?

I'm trying...

michael

fmforums_ender.fp7.zip

Posted

I just noticed, if create a vendor and some products for that vendor I get "value list not defined" in the Order. Why is it doing that?

Posted

Define a calc in the PO table:

Total (calculation, number result) = sum(PO_Line_Item::Extended_Price)

This topic is 6887 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.