AnsweredAssumed Answered

Restrict the Number of Matching Records in a Found Set

Question asked by bee13 on Mar 22, 2016
Latest reply on Mar 22, 2016 by erolst

What would be the most efficient approach to script a process that restricts the number of matching records in a found set?

 

Background: Say I have 100 separate newly-baked cookies and in a database table I have one corresponding FM record for each cookie. The cookies are not yet packaged and so are considered "loose."  A "status" drop-down field in each of the records can have either a value of "loose" or "packaged" but all 100 currently indicate "loose" because the cookies are still on the countertop cooling. (Hungry yet? )

 

Now, after they've cooled, I need to package the cookies but each package only holds a maximum of 40 cookies.  In the database, I of course want to automate changing the status of 40 of the cookies from "loose" to "packaged" with one or two clicks and so I whip out the "Manage Scripts…" window and get busy, but I see that I am unfamiliar with the procedure that finds exactly 40 of the "loose" cookies instead of all 100.

 

This has to be a problem with a super-simple solution, only I can't seem to come up with it.  Any ideas?

 

Thanks in advance!

 

MacBook Pro, FMPA 13, Intermediate Skill

Outcomes