script your find button
got to layout - > your layout for the find
enter new request
set Customer:Current = 1
goto field -> customer name
press return
presto!
Main Topics
Browse All TopicsOur current Customer "Find" button simply enters find mode, the customer name is entered and the find is completed by pressing the return key. I would like this function to constrain the found set to current customers only (Customer:Current = 1). This can be easily done by adding another button to constrain the find after the initial search, but that is clumsy and doesn't overcome the problem that prompted the need for this change. I have tried writing all kinds of scripts to get a single button solution, but am getting nowhere. Help much appreciated
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Consider replacing the find menu item with a call to a script that does something like what kraftyman suggests (more on that below) no button needed, or at least BOTH the button and the users that simply invoke command-F (or control-F) wll get the same result.
The script should really be more like this:
got to layout (your layout for the find)
enter find mode
set field (Customer::Current; 1)
go to field (Customer::Customer Name)
pause/resume script
perform find
... and some erorr checking might not be bad, as a second request would not have the Current field populated, etc.
Thanks Guys!
North2Alaska - bit lost on yours and not sure what further details you require. Customers are classified as current or not by a 0 or 1 flag in a checkbox field and I am looking for a one button solution to perform a customer find that will select from current customers only.
kraftyman - not sure what "enter new request means" but also can't understand why
Go to Layout Customers
Enter find mode
Setfield Customers:Current = 1
Go to Field Customers:CustomerName
And then performing the find request doesn't work
lesouef - Hi my fiend - how goes it? Maybe yours would shed some light on this but I only have 8.5 pro, not advanced so I can't work with custom menus.
skeleton_key - tried all variations of pause/resume script that i can think of, but can't make it work.
Any further help or clarification much appreciated.
Thanks Kraftyman and that's exactly how I thought it should work.
So why doesn't it work on my database (attached)? Script is "CustomerFind" and is first script in the pulldown menu. Only obvious difference I can see is that my Current field is a number field and yours is text.
I must be missing something really obvious....
your file is locked so I can't debug the find script
your customer find script puts a zero in the name field - why?
set up your script as I explained
enter find mode ( uncheck pause !)
set field "Current" = " 1 " or whatever it happens to be for your current customer
go to field "name"
the enter key should then execute the find
Thanks but can you make this script work on my database? This is where I started some while back before trying more exotic solutions and I still get the same result: the "Current" checkbox remains unchecked and I get a zero in the Customer field. Same happens on the other computers sharing this database. If you can make this work and I can't, I can only assume my FM program is corrupt. By the way, the script is only a menu item while I am messing around with it.
I think I see the problem with your script. Look at the script step options area at the bottom of the script when you select the assignment. You have not specified a target field. The calculation is incorrect as well. The calculation says "Customers::Current=1". This is a formula not an assignment. So, it tries to evaluate the formula. It asks the question is Customer::Current equal to One. The answer is no (or false) so it puts a zero in the field. Your script step should look like this:
Business Accounts
Answer for Membership
by: North2AlaskaPosted on 2009-10-09 at 02:45:26ID: 25533420
Use a relationship to force the selection. Steps might include:
1) Create a global field labeled One and put a 1 in it. ;-)
2) Create a relationship between One and the Customer:Current field or add it to the existing relationship
3) You may need other/Additional TOs to make it all work
Just some thoughts that come to mind. If you would like to share the details, I could be glad to take a stab...