Newbies Alex Norton Posted October 29, 2001 Newbies Posted October 29, 2001 Hi I am just learning filemaker pro ver 5. I am tyring to create a button that performs the following task 1.enter find mode 2.auto enter some text into a specified field 3 perform the search I have been playing around with the scriptmaker, I can do 1 and select the field but cant enter the text. I have been playing wiht the "insert Text option" but I cant get it to work. Help!
Garry Claridge Posted October 29, 2001 Posted October 29, 2001 Try "SetField" for entering the text. All the best. Garry
danjacoby Posted October 30, 2001 Posted October 30, 2001 If it's always the same text in the same field, perform the search, then create a script to: PerformFind[Restore, No dialog]. This will perform the last find you did.
Allegheny Posted November 1, 2001 Posted November 1, 2001 >>>PerformFind[Restore, No dialog]. This will perform the last find >>>you did. Which "last find" will the script perform? The last find performed before the script was last altered? The last find before the script is called up? I had to create a series of scripts, each finding records belonging to 1 of 6 different categories. Before I created each one I manually performed the find and told the script to "restore without dialogue" that request. Then I "replaced" the find request when the final dialogue box asked if I wanted to keep or replace. Was I correct in "restoring"? Was I correct in "replacing"?
Vaughan Posted November 2, 2001 Posted November 2, 2001 You want the "Modify Last Find" script step to recall the last find performed. Note that if there is no last find it'll break, so you need to trap for it: Set Error capture [on] Modify Last Find If [ Status(CurrentError) <> 0 ] Enter Find Mode [] End If
LiveOak Posted November 2, 2001 Posted November 2, 2001 Sounds right to me. The last find performed means just that, regardless of whether it was done by a script or manually. Opening a script, closing the script, and selecting "replace" will capture the last find for a Perform Find(restore) script step. Remember that only one find definition can be saved per script, even if you have multiple find statements. As a matter of programming technique, I never use Perform Find (restore). It is not self documenting. The only way to determine the find being performed is to 1) perform it and do a refind on an "All Field" layout or 2) print the script. I exclusively use: Enter Find Mode () Set Field (field1, value) Set Field (field2, value) . . . Perform Find () or some variation. Use Set Field, where possible as it doesn't require the field be visible on the current layout. The "Insert Text" script step fails when the field inserted to isn't on the current layout. -bd
Recommended Posts
This topic is 8427 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