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.

Featured Replies

Can someone please tell me why this script (see below) doesn't work?

What it is supposed to do is print the first record in a set, change layouts, go to the next record, then print the remaining records in the set from the new layout, and exit after last record in found set.

To me, this script seems like it should work, but it does not : . It changes layouts as it is supposed to, but it does not seem to perform the loop as it just keeps continually printing the "first" record and never exits the loop. (Thank goodness for Acrobat!)

Go to Layout ["sales Order Page 1 of X" (Sales Order)]

Print Setup [Restore;No Dialog]

Print [Restore;No Dialog]

Go to Layout [sales Order Page X of X] (Sales Order)

Loop

Go to Record/Request/Page [Next;Exit after last]

Print Setup [Restore; No Dialog]

Print [Restore; No Dialog]

End Loop

Loop

Any Help would be appreciated. This is the last piece in a long puzzle.

Steve

Edited by Guest

Is the setting for the print script step set for "Current" record or current found set?

Try and turning on the dialog box for the print step inside the loop and watch and see what it is defaulting to.

  • Author

Is the setting for the print script step set for "Current" record or current found set?

Try and turning on the dialog box for the print step inside the loop and watch and see what it is defaulting to.

That was mosst of it! It prints right, but does not exit after last, it keeps looping through. Almost there!I didn't think I needed to turn on "Records Being Browsed" because I thought it was "Stepping through" the "Current Records."

Thanks for this much of it!

Steve

Edited by Guest

You could set a variable at the beginning of the script to give you a record count then setup an exit loop condition if the current record ≥ to your variable.

  • Author

You could set a variable at the beginning of the script to give you a record count then setup an exit loop condition if the current record ≥ to your variable.

I understand what you are saying, but isn't the step "exit after last" supposed to handle that?

Steve

Is the final loop in your script the beginning of a new loop in a bit of script that we cannot see?

Since your Print dialog can either print an individual record or the entire found set (regardless of whether your layout is Form or List), why are you looping at all?

If you don't want that first record to print in your second group set, you might simply omit it after its print, then switch to your second layout and print the remaining set. If you are using a calculation to display the total number of pages, you could adjust it by just adding 1.

I believe that, looping through your record set and printing each one individually would be slower than letting your Print dialog print them all in one whack. But we need to know what you're doing here. :wink2:

LaRetta

I have a feeling that a Title header could solve the issue here?

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.