Custom Dialog comments
Friday, August 29th, 2008Here is a typical script that uses a custom dialog:
The first problem here is a lack of commenting. When testing the user's last message choice (which button they clicked in the custom dialog), you are wise to include comments to indicate what is meant by each choice:
This makes it much easier to see what each choice means. So now you can see that button 1 (the default button) was "No" and that no action was taken as a result. Similarly, button 2 was "Print" and the Print dialog is provided. Finally, button 3 was "PDF" and the PDF dialog is provided.
So that is simply good practice to comment your calculations.
There is still an issue caused by the lack of information provided by the custom dialog. We cannot see the names of the buttons unless we physically open the script step using the Specify... button (or a double-click). This is inconvenient. Maybe that requires a feature request to FileMaker Inc.
The solution for now is to add a comment to the calculated custom dialog message:
Now we can see the button names and what is being done for each button choice. Since the comment is not processed by the FileMaker calculation engine, it does not appear in the custom dialog itself.
Of course, the comment does not guarantee that the button names are still the same! If you change the button names in the custom dialog, ensure that you also update the comment.




