Below we show how to display an input dialog with a popup, which displays the values of a second value list, while returning the chosen value from the first list.
This (simplified) example uses fixed text to build the dialog, normally you would fill the dialog with data from your database. In ScriptMaker you need to add script steps to a script, but you can of course copy the script from the example files in the download of Troi Dialog Plug-in.
Implementing the InputDialog
First set the values for the popup. For this popup we fill the optional last parameter, which holds a second value list (with item names).
In this post you find the older release notes for Troi Dialog Plug-in for FileMaker Pro.
Troi Dialog Plug-in versions for FileMaker Pro 12, 13, 14 and 15
Version 6.5.1 (for FileMaker 12 to 15) (February 15, 2017)
- Added switch to the Dial_ListDialog function: “-ExtraLineHeight=x”, where you can specify extra height (in pixels) for each list item.
- (Windows) Improved the Dial_ListDialog function: list items should have more vertical height when using hi-resolution displays.
- Updated the code in several places and added improved namespace handling to make the plug-in more robust.
- (Mac OS X) Improved export of symbols of the compiled plug-in: now only the symbols that are required are exported.
- (Mac OS X, 32-bit only) Fixed a possible interference with other plug-ins, during the registration phase.
- Fixed a bug in the code for registering the plug-in.
Version 6.5 (for FileMaker 12 to 15) (May 17, 2016)
- Tested and improved compatibility with Windows 10 and OS X 10.11 (El Capitan).
- Tested and made compatible with FileMaker Pro 15.
- Improved the multi-threading behavior of the plug-in when running in FileMaker Pro 15.
- Improved the example file EasyInstallTroiPlugins.fmp12, to provide more help when an installation error occurs.
- Added description and type-ahead information for all functions of the plug-in. This extra function description will be shown in FileMaker Pro 15 in the Specify Calculation dialog box when you type a function name and also as a text popup in the functions pane on the right.
The type-ahead information is used by the auto complete functionality of FileMaker Pro 15. In the calculation pane of the Specify Calculation dialog box you can type a letter or two of the function name and instantly see a list of matching function names. For example when you type “li”, the auto complete functionality will suggest the Dial_ListDialog function. You can also type a function name in the functions pane on the right: for example if you type “dial” you will see all the functions relevant to dialogs, like Dial_BigInputDialog.
- Fixed several bugs, rewrote and modernized the code in several places and made further improvements.
- Updated the User Guide and the Overview.fmp12 file.
Troi Dialog Plug-in versions for FileMaker Pro 12, 13 and 14
Version 6.1.1 (for FileMaker 12, 13 and 14) (June 23rd, 2015)
- (Windows) Fixed a problem with the Dial_FlashDialog function, the dialog would stay considerably longer on screen than specified with the ticks parameter.
- Updated the user guide.
Version 6.1 (for FileMaker 12, 13 and 14) (May 12th, 2015)
- Tested and made compatible with FileMaker Pro 14.
- Added support for 64-bit architecture with FileMaker Pro 14: On OS X the 32-bit and 64-bit version is a single universal plug-in and on Windows there are 2 plug-ins: Troi_Dialog.fmx (for 32-bit) and Troi_Dialog.fmx64 (for 64-bit).
- Improved the example file EasyInstallTroiPlugins.fmp12, to support the 64-bit version of FileMaker Pro 14.
- Improved the Dial_Dialog function: the result can now also be the text of the button: add the switch -ReturnButtonText for this.
Troi Dialog Plug-in versions for FileMaker Pro 10, 11, 12 and 13
Version 6.0 (for FileMaker 10 through 13) (March 11th, 2015)
- Improved the Dial_InputDialog function: popups can now display values from a second value list. The selected value from the first value list is returned. You can use this for example with a list of ItemIDs and a list of ItemDescriptions. The descriptions are shown to the user, while the itemID is returned.
- Updated the Dial_SetPopup function: there is now an optional last parameter secondPopupValues, which sets the second value list. When set for a popup, the plug-in automatically displays the second value list, but returns the corresponding value from the first popup list.
- Updated the Dial_GetPopup function: when you add the switch “-SecondValueList” the plug-in returns the second value list for that popup.
- Improved the Dial_ListDialog function: added a switch: -AllowMultipleSelection which allows the user to select multiple items from the list. The selected items are returned separated by the pipe character. You can also preselect multiple items. Command-A (OS X) or control-A (Windows) can be used to select all items.
- (Mac OS X) Improved the Dial_InputDialog and Dial_BigInputDialog functions: added support for undo and redo in the edit fields through these keyboard shortcuts: undo (command-z) and redo (command-shift-z).
- (Mac OS X) Improved the Dial_InputDialog function: added support for these keyboard shortcuts: copy (command-C), paste (command-V), cut (command-X) and select all (command-A).
- (Mac OS X) Improved the Dial_BigInputDialog function: added support for these keyboard shortcuts: copy (command-C), paste (command-V), cut (command-X) and select all (command-A).
- Made several improvements to the dialog example files.
- Rewrote the code in several areas and made it more future proof.
- Added new switch -GetRegistrationState to the Dial_Version function: this switch allows you to check if the plug-in is currently registered.
- Updated Version example to show the use of -GetRegistrationState.
- (Mac OS X) Added code signing to the plug-in, also compatible with the new Mavericks version of code signing.
- IMPORTANT This plug-in drops support for Windows XP (the plug-in will no longer load on XP). On Mac OS X the minimum supported system is now OS X 10.6.8 (the plug-in will not load on 10.5 and earlier).