April 16, 20187 yr Friends: I've been searching but not finding how to do a simple find script to attach to a button as follows: Show all the records (so we know we are searching the whole database) then Find all the records where the field "products" contains the text "film" Thanks in advance for your help, Migs
April 16, 20187 yr Hi Migs, You don't need to Find All records first. Find begins its process searching all records. So, simply enter find mode and enter "film" in your products field. Then, click Perform Find. To script it "Find": Set error capture on Enter Find Mode (pause) //user enters criteria Perform Find //error capture here..do what you want if no records found. Show a custom dialog...find all...
April 16, 20187 yr Author Hi bcooney. I'm most grateful for your answer, but I wish it to be a script that I will call from a button. I don't want that interactive search because it implies typing the search text over and over again. So if I have a button that is labeled "Find all records with film" (in the field named "products") it would be better. Thanks for your help Migs
April 16, 20187 yr Slightly different. Set Error Capture [On] Enter Find Mode [ ] //no pause Set Field [YourTable::Products; "film"] Perform Find [ ] I wouldn't label a button "Find all records with film", instead I would make it a global search field, dropdown, attached to a value list. Then the user can select from a number of different values to do searches. That would be the first upgrade. But more info would be needed. The more advanced upgrade would be a small full search card window that would give the user multiple ways to search the database, by words, dates, etc. But more to your original post, a user should have enough FileMaker basics to be able to: Ctrl+F (to enter find mode), type 'film' into the proper field and hit Return to perform a find.
April 17, 20187 yr Author Hi Steve Thank you very much for your help. In the Set Field step I can only get as far as Set Field [YourTable::Products] But I can't figure out how to add ;"film" into the the equation. Any ideas? Gratefully Migs
April 17, 20187 yr click on the gear icon at the end of the script step. click on Calculated Result "Specify" and enter "film" in the Specify Calculation dialog.
Create an account or sign in to comment