Jed69 Posted September 9, 2009 Posted September 9, 2009 I have a search set up that looks through a number of fields. You can select data for each of these fields and then through the script steps enter find mode, set field and perform find it performs a find that meets all of the criteria set. This works fine however I wish to amend this search because two of the fields data is entered by check boxes and so can have multiple search criteria. For these fields I want the search to be able to do the search so it looks for each of the possible entries in the field. At the moment the search looks for record that match exactly the search request for these fields (ie multiple possibilities) and not any of the possibilities. Is there a way to make the search look at these particular fields contents and separate the entries and search either or. I hope this makes sense. Many thanks John
bcooney Posted September 9, 2009 Posted September 9, 2009 If you are scripting the find, as it seems you are, then just add some New Requests while you're in Find mode. New Requests are the way to do "OR" finds in FM.
Jed69 Posted September 9, 2009 Author Posted September 9, 2009 Hi Thanks for the quick reply. The problem I have is that the fields in question have up to 20 check boxes. When a search is done the user may select any number of these and so I would not know how many New requests to script.
bcooney Posted September 9, 2009 Posted September 9, 2009 Well, you could just get the user to Find mode and pause. Give them a "OR Find" button on the layout that does a New Request for them, and a Perform Find button. How are you capturing their search criteria, in global fields?
Jed69 Posted September 9, 2009 Author Posted September 9, 2009 yes it is just a number of global fields in the table that i set as variables once the search script starts and the global fields then clear as there are multiple users on the site
bcooney Posted September 9, 2009 Posted September 9, 2009 Each user gets their own values in global fields, although you should clear them at the start of the Find script. So, you do not need to set them as variables. You could write a loop that uses ValueCount(gCheckbox) to know how many New Requests you'll need.
Jed69 Posted September 9, 2009 Author Posted September 9, 2009 Ah I see what you mean, that´s very helpful. I will play with that and see if I can make it work. Thank you so much for the point in the right direction.
Jed69 Posted September 9, 2009 Author Posted September 9, 2009 That is so helpful, thank you so much.
bcooney Posted September 9, 2009 Posted September 9, 2009 Just want to mention to you, since you've ranked yourself as a Beginner, that there is no need to build a Find interface using global fields and complicated scripting. It's a technique that is used, but as the user's requirements for search criteria expand and become more complicated, it is often better to simply take them into Find mode to a layout that is often a duplicate of the form view (with nav btns removed) and let them do their find. You can add New Request buttons, or Expand Find buttons.
Jed69 Posted September 9, 2009 Author Posted September 9, 2009 Yes I started off on that route but the requirements of the find became complicated with the need to look at ranges etc. So I created a quick find with just the main fields they wished to search on and then this find which was an extended find. It has proved to be very complicated especially as some users are using web access (so I can not rely on pop up messages) but in the long run it has made it more idiot proof for the users. On the plus side it has certainly exercised my brain :laugh2:
Recommended Posts
This topic is 5556 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