Your script's set field steps set criteria to fields from two different table occurrences. Cylinder info 2 and printer what is the relationship between them?
on which is the layout based?
CylinderInfo 2 only stores a printerID which links to links to the Printer table thru this printerId. The layout is based on the CylinderInfo 2 table.
Nothing obvious shows in your script. I can suggest a few things to try:
temporarily remove or disable set error capture and run the test to see if you get any error dialogs.
Put a pause between perform find and constrain so you can check what found set is produced before it is constrained.
Double check the fields and table occurrences for the fields used when you manually enter the criteria. Make sure that they are exactly the same as those used in your script.
There is also an OMIT script step. You may add it as a new request after all your other criteria is set. No Constrain needed. And don't combine RESTORE finds with other scripted finds (if you don't need to!):
Enter Find mode
Set Field [ ... ]
Set Field [ CylindarInfo2::StatusID ; 40 ]
Thanks all for the help. I used Phil's advice and commented out my set fields and turned them on one at a time to see what caused the problem. Several of the search fields were number fields. Since this was to be a dynamic find as they type I had the set field script steps for the number fields adding an '*' after whatever was in the number field so it would find a partially entered number. If there was nothing in the field the '*' was still being entered so if the field was empty it would not be found if only another field was being searched.
I changed the set field to only enter the "*" if there was something in the field to start with. Now it works fine.
are ways to search "begins-with", but since that is the default in FileMaker and unless you need "any where"
you don't even use "*". But I see you turned it off unless the field to find needs "something" (not empty).
EDITED: reply by email munged the code. HTH!
I agree with beverly on how to rewrite your script. You can also remove the Show All records step on line 7 as it does nothing to affect the results of the find. I didn't comment on that earlier as none of these changes will change the results that you are getting.
BTW, your screen shot is zoomed so large that the part of your script with the * is clipped unless you click on the image to view it in it's entirety. That's how I messed the * detail anyway.