Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

The title is a little misleading.

I want to do a search for some records, and then the records I find, I want to do a search using the ID from each record found and then do something to that record that is found. I want to keep doing this until I have gone through each record found in my first search.... so.

Search 1 (finds 5 id numbers)

loop

Search 2 (find all records containing first id number of first search, based on two fields, so it will only find one record)

Do something to that record

go to next id in first search, place that id in search 2 and keep going until all the records found in first search are done.

end loop

This is a very simple thing to do in programming language, or even sql, but I can't figure it out with filemaker. Is it even possible? Can I store every single record in an array or something so that I don't lose the information from the first search which I need for the second one?

Posted

It looks like you're equating 'found set' with 'current record'. In Filemaker, a Find establishes a found set. This can be any number of records from 0 to total number of records in the table. The current record can be any record within the found set, and you don't lose the found set by moving to another record.

Use Find to find the records you want to operate on, then:

Go to Record [First]

Loop

<< do something to the currrent record >>

Go to Record [Next, Exit after last ]

End Loop

Posted

Well. I am not sure if that works.

I have an "Item ID" and a "Component ID". I have an Item master table that contains all the Item ID's and Component ID's in one field called Item ID. I have a second Table called BOM that has an Item ID and a Component ID. It has the same Item ID multiple times, once for each Component ID under and Item ID.

example:

Item Number: 410004013, has a Component ID 040004024, it also had another Component ID 989898128. So I end up with two listings for 410004013 in the BOM Table ( don't ask, the clients database is messed right up). I use a flag field to mark which record out of all of them with the same id 410004013 to display (otherwise I would get 5 of the same id when they go through the records and they don't want this, the components are displayed in a portal for each record. This flag is the number 1, the others are 0. I want to find all the Item Numbers that have a Component ID of 040004024, then out of those find the Item Numbers with the flag 1, which isn't neccessarily the item number with the corresponding Component ID of 040004024. That's why I need to keep track of my first search Item Number's. I will try the method you mentioned, but I don't think it applied to my case because of the nature of how the database is set up...

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