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.

running a script to view current record in preview mode

Featured Replies

Hi,

I want to set up a script that will change layouts from browse to preview and bring up the record that was being browsed. Every time I set up a script, the record that the script previews is the first record in the database. How do I tell the script that I want the current record to be previewed?

Thanks,

Constance

The easiest way is to reduce the Found Set to just that single record before previewing. That will have what may be the undesired side effect of destroying your original found set however.

What are you actually trying to do here?

Old Advance Man

  • Author

I basically want to make people's life easier by running a script that will take the current record, put it into a different layout in preview mode so that they can check to make sure it looks fine and then print it.

eg. A person enters a new invoice in layout 1 where there are a lot of other fields besides what needs to be printed. The person wants to preview the invoice before printing it out to make sure all the data is there or correct etc.

At least 2 ways to do this.

First one is to isolate the record you want, switch layouts, go to preview mode. Doing that destroys the rest of the found set however. But it does work.

Another is to make a shadow file. This is a file with one record that is related to the invoices file. It has all the related fields from invoices arrayed as you want them to print. The relationships is established by setting a value in a key field (global field) in the shadow file that will match a unique value in an invoice record. When that is done the dta are displayed and can be printed.

HTH

Old Advance Man

Show all records

Omit record

Show omitted

Go to layout [PrintLayout]

Enter Preview Mode [Pause]

Show message ["Do you want to print?"] (with "Yes" and "No" choices)

If [status(CurrentMessageChoice=1)

Print

End If

  • Author

Thanks, that worked wonderfully!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.