[Forums] [Shop] [Resources] [Training] [About] [Solutions] [Consulting] [News] [Links]

Questions s I hope you enjoy this FREE online training. Let me know if you'd like to see more! You can email me at jmo@filemakerpros.com. And, if you really like this online training, consider one of my live classes based on my wildly popular book and CD ROM. Happy FileMaking!

Status(CurrentMessageChoice)

When you add the Show Message script step, the most obvious option is to change the message. You also have the option of changing the button names. But what good are changing the button names if you can't perform different actions based on the button choice by the user? Well, the Status(CurrentMessageChoice) function allows you to determine which button is clicked.

The Show Message script step has a maximum of three buttons. If the button name is left blank, the button will not show in the message dialog. The buttons that do show in the Show Message dialog are numbered from 1 to 3 starting from the right. When a user clicks on a Show Message button, FileMaker temporarily stores a number from 1 to 3 in memory. The Status(CurrentMessageChoice) function allows you to access the choice stored in memory.

If and Show Message + script in MESSAGE.fp5

This script differs from the example in the first exercise in that it changes the color currently on the record to whatever button you decide. This script may look difficult because it is so long, but when you break it down, it is just a bunch of If statements over and over.

NOTE: The third button in the Show Message script steps above is labeled "No Change". Think of this as a Cancel button. That is why there is no test for a button choice of 3. If the choice is 3, nothing should happen.

NOTE: Under the Windows platform, the Show Message dialog has a close box in the upper right corner. If a user clicks the close box, the Show Message dialog will be dismissed and a number 1 will be stored in memory as the button choice.

EXCERCISE: Add an additional color to this script. The Show Message dialog only allows for three buttons, so remove the option for "No Change" to fit the third choice.

Previous | Next


Exclamation s Database Pros offers training classes across the globe. Classes include the wildly popular Intermediate and Advanced Scriptology training series.


Database Pros