Dr.Hamed Posted December 1, 2010 Posted December 1, 2010 Is there a simple command in FM to preview the current record; rather than previewing the entire found set until one gets to the required record?. Thanks
Reid Posted December 1, 2010 Posted December 1, 2010 One way to do it might be to make a script that finds the current record and then goes into preview mode. Something like: Set variable $currentrecord Perform Find $currentrecord Enter Preview Mode
bcooney Posted December 1, 2010 Posted December 1, 2010 You may wish to isolate the record in a new window. This way, you can close the window after preview and maintain the user's found set.
Vaughan Posted December 1, 2010 Posted December 1, 2010 No need to perform a find. New Window Show All Records Omit Record Show Omitted
Dr.Hamed Posted December 1, 2010 Author Posted December 1, 2010 Thanks, The second line of the script is to Perform Find, is asking for a field to choose. Please help.
bcooney Posted December 1, 2010 Posted December 1, 2010 Use Vaughan's suggestion. Add Enter Preview Mode at the end.
Reid Posted December 2, 2010 Posted December 2, 2010 Both the Set Variable and Perform Find should ask for a field. They just have to be the same. If you're using the record ID (serial number) then you can set a variable like $serialID and then tell it to use the serialID field. Then when you do a find you would use look for the same field serialID that would equal $serialID (the variable you set earlier). Does that make sense? Vaughan's way might be better though.
Reid Posted December 2, 2010 Posted December 2, 2010 Isn't omitting a record and then showing the omitted the same as doing a find?
comment Posted December 2, 2010 Posted December 2, 2010 Isn't omitting a record and then showing the omitted the same as doing a find? No. Performing a find is more work for the CPU and can be significantly slower with large record sets. See also: http://fmforums.com/forum/showtopic.php?tid/184454/post/239925/#239925
Reid Posted December 2, 2010 Posted December 2, 2010 Great to know! I'll change my evil ways. So is this what should be used? (taken from the thread link) Loop Exit Loop If [ Get ( FoundCount ) = 1 Show All Records Omit Record Show Omitted Only End Loop
Vaughan Posted December 2, 2010 Posted December 2, 2010 Get rid of the loop. What if the found set is empty? Either way it's redundant.
Vaughan Posted December 2, 2010 Posted December 2, 2010 OK, yes, I see what you're defending against... but that could happen any time.
ArKay Posted December 3, 2010 Posted December 3, 2010 No need to perform a find. New Window Show All Records Omit Record Show Omitted I can't believe how many times I could have used this script in the past. It might be simple, but with the addition of the final step, Enter Preview Mode, it's a great tip. Thanks.
Recommended Posts
This topic is 5104 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