[FileMaker] 特定フィールドの文字列を置換する

スクリプトで特定のフィールドの文字列を置換する方法。

Show Custom Dialog [ "対象フィールド名を入力してください。" ; $field ]
Show Custom Dialog [ "置換前の文字列をを入力してください。" ; $search ]
Show Custom Dialog [ "置換後の文字列を入力してください。" ; $replace ]

# 一旦検索語で検索(全フィールドを対象)
Perform Quick Find [ $search ]
Go to Record/Request/Page [ First ]

Loop
 Go to Next Field
 If [ Get (ActiveFieldName ) = $field ]
 Set Field [ Substitute ( Get (ActiveFieldContents ) ; $search ; $replace ) ]
 Go to Record/Request/Page [ Next ; Exit after last: On ]
 End If
End Loop