dervaish Posted May 6, 2008 Posted May 6, 2008 (edited) hello to all i have a layout with over 40 fields. i want to set up a script where user can perform a search either by a single field or multiple fields. search selection [single field / multiple] completely depends on the user. how can i work around this so that my script builds a query/search-string based on filled-fields and then perform the search n return the matching records. for eg: field 1: id field 2: fname field 3: lname field 4: address field 5: gender . . . field n: comments i want to write a script that will let user run a search/find based on a single/multiple fields input. thanx in advance for your help and input. Edited May 6, 2008 by Guest
LaRetta Posted May 7, 2008 Posted May 7, 2008 I would use a dedicated layout. Color the background or put FIND MODE at the top of the layout along with a simple CLOSE button which returns the User to the main layout. Set the fields in behavior to not allow entry in Browse. Place a button called FIND. Attach to the button script step: Modify Find Request. You can originally place them in Find mode when they go to the layout but it seems clearer to them to always know (for consistency) that they must click a button to enter find mode. If they have no prior find request then all fields will be empty when they click FIND. But if they have already entered criteria in one (or several) fields and they don't get a result, using Modify Find will again produce their prior search criteria for easy modification. They can see what they did wrong. Why do you feel you need a Find for a single critieria and a Find for multiple? Wouldn't it be the same either way? Actually, scripting for multiple can be more complex. If you leave it in the hands of the User, it usually works better. You can have a second button called ADD NEW REQUEST which would be simple script step: New Record/Request. This would allow multiple OR searches. Much depends upon your Users' needs.
LaRetta Posted May 7, 2008 Posted May 7, 2008 which would be simple script step: New Record/Request. Very sloppy. If they can be on this layout in Browse mode, it would create a new record. And I KNOW to protect from that possibility. DOH. Script it as: If [ Get ( WindowMode ) = 1 ] New Record/Request Else Show Custom Dialog [ OK ; "you must perform a find first" ] End If Okay, I'm tired. I'm stopping before I mess up even further. Sleep well, universe. I hope you're still here when I wake up! :wink2:
Recommended Posts
This topic is 6042 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