jim shelton Posted June 17, 2013 Posted June 17, 2013 Using Filemaker 11 on Windows, writing a script to run a report. Script is working if I only search for a single group or all groups along with either one, two or all three of the types. How can I extend the find to allow the User to search for either 2 or three Groups? There will be the same Types selected for each group. I have captured the list of Groups as a varialbe with each value separated by a <cr>. thanks, Jim
MartieH Posted June 17, 2013 Posted June 17, 2013 use globals - make 3 global fields - G_group1, G_group2, G_group3 script so that the user has the ability to enter data into one, some or all of these global fields. Then, the script should perform the find - setting the group field to be found from the Global fields and extending the found set with each find. If no data has been entered, nothing will be added to the found set. the script should end by setting each global field to blank to be ready for input for the next time. this could be done in a custom dialogue or in a pop-up box or on a separate layout - what works best for you. hth, Martie
Gabriel Khaselev Posted June 17, 2013 Posted June 17, 2013 Depending on the nature of the names of your groups you might just need to specify the right criteria for a Perform Find script step. For example if your groups range from 1 to 10 and you want to search all the groups between 5 and 8 you could specify the find to search for the range of 5 to 8 (which looks like this 5...8 when you specify the operator).
jim shelton Posted June 17, 2013 Author Posted June 17, 2013 There are over 400 Groups, so I have the three globals which are populated from a list with values separated by a <cr> My script does not seem to be gathering the data from the group global on the Extend. I have tried it two ways. Method A Perform find handles the first Group and the other criteria. This step works Enter Find Mode Set Field [staffing::gMatchTwo; GetValue($OrgList;2) Extend found set Method B Perform find handles the first Group and the other criteria. This step works Set Field [staffing::gMatchTwo; GetValue($OrgList;2) Extend found set
David Jondreau Posted June 17, 2013 Posted June 17, 2013 The value of a global field is the same across all records. Trying to find on a global field won't get you anywhere.
MartieH Posted June 18, 2013 Posted June 18, 2013 yes - it looks like you have it backwards - you use the global fields to set the field that you want to perform the find with. M
jim shelton Posted June 18, 2013 Author Posted June 18, 2013 That was it! Thanks. Guess I was standing too close to the trees.
Recommended Posts
This topic is 4177 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 accountSign in
Already have an account? Sign in here.
Sign In Now