这在 FileMaker 7 中可能很困难。如果您考虑升级到版本 11 或 12,它会容易得多。在更高版本中,您有一个称为 ScriptTriggers 的功能,该功能对您的解决方案非常有用。
我能想到的唯一真正的方法是,如果您编写一个带有自定义对话框的脚本,该对话框显示两个字段,一个用于电子邮件,另一个用于重新输入电子邮件。然后你把这个对话框放在一个循环中,这样它就会一直询问新的电子邮件,直到你点击“取消”
为此,您将需要两个全局文本字段 globalText1 和 globalText2
脚本可能看起来像这样。
[Set Field globalText1; ""]
[Set Field globalText1; ""]
[Loop]
[Show Custom Dialog; "Enter new Email"; globalText1; globalText2]
[If get(lastMessageChoice) = 2]
[Exit loop if: True]
[Else if globalText1 <> globalText2]
[Show custom dialog; "You must type the same E-mail in both fields"]
[Else]
[Create new Record]
[Set field "Emailadress"; globalText1]
[Commit record; Do not display dialog]
[Set Field globalText1; ""]
[Set Field globalText1; ""]
[End if]
[End Loop]
请注意,带有两个输入字段的对话框需要两个按钮。按钮 1 是“确定”,按钮 2 是“取消”。第二个对话框只是一个警告,需要一个“确定”按钮并且没有输入字段。
希望这可以帮助