Is there a way to build the script in a text editor and then copy and paste it into a Filemaker script? (Using Filemaker Pro 11 with Windows 7.)
Unfortunately no. You can't copy/paste a script to another program and vice versa.
Oops, hit "reply" before posting about your first question.
Is it always the same ID numbers you're finding? Is there any other identifier you could search on? Could users "flag" records for this find throughout the day, so you could then find on the "flag" field?
Not sure I have enough info about it to help.
You shouldn't need to use the extend found set feature, you can just build up a find with multiple requests, so in your script you can enter:
Enter Find Mode
Set Field ID = 1234
New Record Request
Set Field ID = 2313
New Record Request
Set Field ID = 2228
Still a pain to have to enter all 125 entries into the script though and if you ever need to add/remove entries someone needs to edit the script.
If you didn't want to create a new field that can be used to flag the records (which I personally think is a good idea) another possible work around would be to create a new table to store the 125 numbers in (you could even set up a script to allow users to import into that table from an excel spreadsheet or something like that if you needed) and then set up a relationship between your existing table's ID and the new table's ID.
Then you would just need to search for any record that contains a value in the related table:
Enter Find Mode
Set Field RelatedTable::ID = *
Only those 125 records that have a value in the related table would be found.
Using this or the flagging method makes it a lot easier to modifty your list of entries if needed as you are either turning on/off a flag against the record, or creating/deleting a record in the new table.
Hope that helps.
Paul has some great suggestions. There are a few variations that might be helpful.
For example, if you copied and pasted all of the values into one global field (return delimited), then you could have create a relationship between this field and the ID numbers. Then, one script step (Go to Related Records) would find all of them.
Other options include passing the IDs to your script as a script parameter (again return delimited) and then setting the global from the script parameter.
You could also write a looping script that loops through each line of the global (or parameter) and creates a new find request for each one, but this seems more complicated.
Hope this helps,
Thank you for this feedback. From my programming experience (PHP and MySQL most recently) I am familiar with all the concepts you describe, but I'm still having a difficult time figuring out how to implement them in the FM environment. But I'm getting better. Discussions like these are actually very educational in helping me get there.
Sent from my iPad
If you want it to be reusable, you could also have a global field in which you could enter the list of all the numbers you need to search (this would allow you to copy / paste a list of numbers from a text editor or from excel). Then you create a script that will loop through that list of number and for each of them add a request. Once the loop went through all the numbers, the script just has to perform find.
I like your idea Paul, and this is just what I wanted to do, after I find the set, then I will flag as you suggested as well.
Where are your entering this in your script? I am having some trouble creating this script to do as you suggest.
Actually I hadn't read the last post but had created a sample because I use this technique all the time also.
It is in version 11 but if anyone has 12 they can just drag the file to 12's icon and it will easily convert.
FindMultiple.zip 5.2 K
Yes that is exactly what I was looking for. thanks LaRetta.