LoginSignup
0
1

More than 5 years have passed since last update.

スクリプト テンプレート

Posted at

FileMaker Pro16 Advancedのスクリプトワークスペースの使い勝手は改善されてきたとはいえ、まだまだ他の言語のIDEに比べると、まだまだ大変・・・

スクリプトのテンプレート例

スクリプトのテンプレート例です。
これをコピーして、新しいスクリプトを作成します。

image.png

Created : 作成日・作成者
Updated : 更新日・更新者
Summary : 概要
Params : Parameters。パラメータや引数について
Return : 返値について
Global : Global Variables。グローバル変数
Caller : 呼び出し元のスクリプト、ボタンなど
Comments : コメント
History : 更新履歴

----------Initialize----------
初期化。
スクリプトに共通する処理

----------Parameters----------
パラメータ・引数の処理。

----------Valid----------
引数の整合性のチェックなど
実行前に条件が整っていなければ終了など

----------Action----------
実行

その他

  • テンプレートの最初のコメント部分の用語には、分かりやすくて短いものが認識しやすいという考えです。例えば、項目名を、Global Variablesとせずに、Globalとしているのは、Globalだけで分かるからです。

  • スクリプトの、UI Browse-NoRecords-Commit はブラウズモードでなければ終了。レコードがなければ終了。レコードがコミットできなければ終了。
    参考
    http://notonlyfilemaker.com/2015/05/filemaker-scripting-best-practices-and-conventions/

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1