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.

record number calculations within a series

Featured Replies

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!

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]

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

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).]

  • 2 weeks later...
  • Author

Thanks folks, got it :-)

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.