Jump to content
Server Maintenance This Week. ×

record number calculations within a series


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

Recommended Posts

Situation: I have a database that tracks materials. Each material is identified by an item number. There are some materials that have more than one vendor or price. I need to be able to assign a record number to identify which vendor and price I want to use. For example:

ID 48 has 2 records.

Record 1 has Vendor A with Price A

Record 2 has Vendor B with Price A

How do I assign the number 1 and number 2 (and so on) to each record for Id 48 so that I have

Id 48 record 1

and

Id 48 record 2

Thanks!

Link to comment
Share on other sites

quote:

Originally posted by markga:

Situation: I have a database that tracks materials. Each material is identified by an item number. There are some materials that have more than one vendor or price. I need to be able to assign a record number to identify which vendor and price I want to use. For example:

ID 48 has 2 records.

Record 1 has Vendor A with Price A

Record 2 has Vendor B with Price A

How do I assign the number 1 and number 2 (and so on) to each record for Id 48 so that I have

Id 48 record 1

and

Id 48 record 2


You should do the following: Assuming that you have a Materials database and a Vendor Database, create a Mat_Ven_Items database. This database has a record for each Vendor-Material combination and contains information such as VendorID, MaterialID and other information specific to this combination such as price.

You can try creating a compound key of something like VendorID & "-" & MaterialID, but you need to be really careful on how you use this to insure that you have all unique values. It is also problematic if a particular vendor carries multiples variations of the same material.

------------------

=-=-=-=-=-=-=-=-=-=-=-=-=

Kurt Knippel

Senior Filemaker Developer

http://www.database-resources.com

mailto:[email protected]

=-=-=-=-=-=-=-=-=-=-=-=-=

Link to comment
Share on other sites

It sounds like you need to have two databases. The first would be "Items" and the second "Sources". Relate Items to Sources using the ID number. Set the relationship to "allow creation of related records" Display Sources in the Items database by creating a portal. Clicking on the next empty line in the portal will create another entry in Sources. Create a field in Sources called "Priority". You can use this field to assign a priority order to your sources for an item. The relationship can be set so the portal is sorted in ascending order of priority.

-bd

Sorry, Kurt. Just a case of simultaneous answer submission!

[This message has been edited by LiveOak (edited September 06, 2000).]

Link to comment
Share on other sites

  • 2 weeks later...

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