Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Staying on current record in Preview

Featured Replies

I want to go to layout, enter preview mode and print but it never goes to the correct record, always goes to first record. I seem to remember reading something about this in 5/6 but can't seem to locate it.

Any help?

r

This is normal behavior, FileMaker doesn't know that you don't what to preview all of the records in a Found Set. You need to isolate the record.

[color:red]First be sure you have selected the Record

To do this manually,

Show All Records ([color:blue]cmd J)

Omit ([color:blue]Cmd T)

Show Omitted ([color:blue] Menu >> Records >> Show Omitted no keyboard short cut

Or, this can be scripted

Your Script would look something like

Go to Layout (your layout to be previewed)

Show All Records

Omit

Show Omitted

Enter Preview Mode

You can either attach it to a button, or use the Cmd 1 or what ever the number is assigned under the ScriptMaker window.

HTH

Lee

:)

  • Author

Thanks Lee, that certainly looks easier then what I've been trying (Scriptparameter, relationship, etc). I'll give 'er a go.

r

You could also have 2 scripts that look like this.

1st Script:


Perform Script [ S2; Paramater: Get(RecordNumber)]





2nd Script:



Enter Preiview Mode[]

Go to Recrod/Request/Page [No Dialoge; Get (Script Paramater)]

Edited by Guest
Realized you were in FM6 not 7 so I don't know if this will work for you or not.

Script parameter isn't available in v6. :)

Could you explain your script for ME, as I'm just getting into v7. In other words, what is S2 in the first script?

Lee

ricardito,

Check this thread for my demo file illustrating a technique to omit the other records for the preview, then return to the correct found set afterwards:

http://www.fmforums.com/forum/showtopic.php?tid/101576/

It uses the Copy All Records step to grab the IDs of the found set and the current record, then omits the other records like Lee has shown. Following the preview, it returns to the previous found set with a Go to Related Records[ show ] step, and another Go to Related Records[] step to jump the correct record within that set.

Lee:

I believe "S2" is shorthand in that case for the second listed script.

-Stanley

[color:blue]Hi Mike,

Thanks for the link, I'll check it right now.

[color:blue]Hi Standley,

That was my thought too, but I wasn't able to get to work properly, I'm getting a page instead of a record, which seems logical from the script step.

Thanks to both of you for your help.

Lee

:)

  • Author

I'm using 7 (need to update my profile).

The record id/get scriptparameter didn't work for me, that was the first thing I tried since it's the easiest. I paused the script throughout to watch but it never would go to the original record.

The omit by Lee is working fine.

Now I'm face with the nasty part that I'm having a lot of trouble with. In 6 I could print a reciept that had 3 portals, a portal of service items, a portal of products then at the bottom a portal of all payments made on that invoice. They all collapsed beautifully and worked just great in preview.

In 7 you cannot have portals on more than 1 page, they just don't show in preview mode.

Anyone have a good idea of how to get 3 tables summarized on one layout? I've tried the sub summary fields, etc. but can't get it to work. This is most annoying.

r

That won't work: When you are in Preview mode, the 'Go to Record/Request/Page' script step goes to the specified page. Using Get (RecordNumber) to specify the page may get you to the desired record - if the layout is set up to print one record per page.

  • 2 weeks later...

IMHO a much better way to handle this in FM7 is to open a new window. The problem with the FM6 solution is that you loose focus on your found set.

This is a very common real life problem I have run accross. A user works very hard to get a particular found set. For example a list of invoices created in a date range, from certain clients. They spend a good amount of time to manually omit records from the found set.

They try to use your 'print this invoice' button that you created for them. then they found that their found set is gone!

In FM7 you can simply open up a new window containing the single record, in preview mode, then print it close the window and be returned to your found set!

I added a script to the PO database included in the sample databases in FM7 to illustrate my point. Check out the attached file.

I have one question for the 7 guru's out there too.

Using this script, the prview window shows 2 pages, the first is blank the second page is my record. But when I print the record, I do get just the one page I wanted. How do I get just one page on the Preview?

TIA

Jerry

Hi Jerry,

Using a new window is a good idea for this type of thing in FM7. You'd just need to be careful to remove such windows after they are used.

I haven't seen the blank page problem you reported, and I don't see an attachment.

BTW: I'm not sure which FM6 solution you were referring to. My solution does return to the correct record in the current found set, though the sort order could be lost if the users have the ability to sort on their own.

Batting a thousand today ;)

Let me try to attach the file again.

Hey Jerry,

You'll need to zip or stuff any files you wish to include as an attachment. How's that average now? ;)

Funny, the valid File types specifically say they alow fp7. I bet it was the space that was the problem. I ziped it AND removed the space.

I have my fingers crossed!

Jerry

StayOneRecord.zip

Hmm, the preview looks normal on my computer--only the one page. Do you have the v3 update installed of FMP? Could it be something with Jaguar or your selected printer?

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.