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

Hello Everyone...

I have a simple question I hope...

Setup:

10 Tables...only need an example for one I can do the rest..

Tables: Main and Policies

I would like to make a script that will only print desired records...

I have a field called Status...Is there a way to make a script that can ask me or give my choices by either pull down menu or buttons which status I want to print (Active or Inactive)

I only wish just to print one...and have the others not show up...

Help?

Joseph

Ten tables. Two tables. What are you talking about?

  • Author

Sorry...

Setup:

Tables: Main and Policies

I would like to make a script that will only print desired records...

I have a field called Status (in the Policies table)...Is there a way to make a script that can ask me or give a choice by either pull down menu or buttons of which status I want to print (Active or Inactive)

Help?

Joseph

Joseph31 said:

Sorry...

I would like to make a script that will only print desired records...

A very basic need for a database, and one that is often discussed on the Forum.

Basically, you want to use FileMaker's ability to remember the last Find and Print that is performed when setting up your scripts.

Start by performing a Find for the records that are noted as Active, and then print them. Once you have your report the way you want it, immediately create a script using the script steps Find and Print. Be sure and name it appropriately.

Next do your find for the Inactive, immediately create your script using the script steps Find and Print. Be sure and name it appropriately.

HTH

Lee

smile.gif

I think what you want is to venture into the world of conditional scripting. I.e., you use IF to test for a certain condition, then proceed accordingly. Sample script:

show message(what do you want to print?)

#buttons would be "Active" and "Inactive" (and I'd include "Cancel")

#now I'd set a global field to whatever button was chosen, which is a number

Set Field(gChoice, Status (CurrentMessageChoice) )

If( gMessageChoice = 3 )

. Halt script

End If

Enter Find mode

If( gMessageChoice = 2 )

. set field( status, "Inactive" )

Else

. set field( status, "Active" )

End If

Perform Find

Page setup(restore)

Print

Another method would be to have the global text field on your layout with a value list of "Active", "Incative", and a Print button next to it. Then the script would be very simple:

Enter Find mode

Set field( status, gChoice )

Perform Find

Page setup(restore)

Print

Of course there are other issues to consider, such as what if no records are found, so you'd Set Error Capture On before Perform Find, and then If( Status (CurrentFoundCount) = 0 ) do something. Also, with a simple find request like this, GTRR (i.e., go to related record) can be much quicker than a Find. But that's probably more than you wanted to know.

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.