Script Steps Reference
Table Of Contents
- Chapter 1 Introduction
- Chapter 2 Control script steps
- Chapter 3 Navigation script steps
- Chapter 4 Editing script steps
- Chapter 5 Fields script steps
- Set Field
- Set Next Serial Value
- Insert Text
- Insert Calculated Result
- Insert From Index
- Insert From Last Visited
- Insert Current Date
- Insert Current Time
- Insert Current User Name
- Insert Picture
- Insert QuickTime
- Insert Object (Windows)
- Insert File
- Update Link (Windows)
- Replace Field Contents
- Relookup Field Contents
- Export Field Contents
- Chapter 6 Records script steps
- Chapter 7 Found Sets script steps
- Chapter 8 Windows script steps
- Chapter 9 Files script steps
- Chapter 10 Accounts script steps
- Chapter 11 Spelling script steps
- Chapter 12 Open Menu Item script steps
- Chapter 13 Miscellaneous script steps
- Appendix A Glossary
Chapter 13
|
Miscellaneous script steps 137
Use the Get(LastMessageChoice) function to determine which button the user presses.
• 1 represents the rightmost button
• 2 represents the middle (or second) button
• 3 represents the leftmost button
Button 1, the default or rightmost button, is the only button that will write information from
the input fields to a file.
Notes
• If values entered into input fields don’t match the field type, a validation error
message displays. The user must resolve validation errors before the dialog box can
be closed. See FileMaker Pro Help for more information.
• The fields you specify don’t need to appear on the current layout. Show Custom
Dialog input fields are independent of layouts, similar to the Set Field script step.
• Data can't be inserted into calculation or summary fields.
• As with Set Field script step, Show Custom Dialog will bypass the Allow entry into
field field formatting option.
• Data entry via the Show Custom Dialog script step is limited by any access privileges
rules that may be in place. (Select Run script with full access privileges to enable
the script for all users.)
• (Windows) You can create a keyboard shortcut for a custom dialog box button by
placing an ampersand before the shortcut key letter in the button label. For example,
to create a keyboard shortcut ‘D’ (Alt+D) for a button labeled ‘Done’, type the label
‘&Done’.
Examples
The following performs a search using a custom dialog box. The dialog box asks users to
enter a customer name and city. The dialog box shows a custom title, custom text, and
two input fields.
Example One:
#This script begins by entering Find mode.
Enter Find Mode []
#The custom dialog box solicits the name and city of the customer
to be found.
Show Custom Dialog ["Find a customer"; "Enter the name and city
of the customer below:"; Customers::Name; Customers::City]
#In this example, button 1 is "OK" and button 2 is "Cancel."
If [Get (LastMessageChoice) = 1]
#If the user selects button 1, the Find is performed.
Perform Find [Restore]
End If