Filemaker Pro 8.5 Advanced Maintenance TG761Z/A 用户手册
产品代码
TG761Z/A
Chapter 7
|
Get functions 67
Get functions example
This script uses the function Get(CurrentDate) to check each record in the found set
to see if an account is past due. If an account is past due, the script shows a message
and prompts the user to click a button labeled Ignore, Send letter, or Send mail (set up
through the Show Custom Dialog script step). The script captures the user's response
using Get(LastMessageChoice). Then, based on the user's response, the script
and prompts the user to click a button labeled Ignore, Send letter, or Send mail (set up
through the Show Custom Dialog script step). The script captures the user's response
using Get(LastMessageChoice). Then, based on the user's response, the script
performs an action: it cancels the rest of the script, prints a "payment is late" letter, or
sends email to the associated account.
sends email to the associated account.
Enter Browse Mode []
Go to Layout ["LayoutName"]
Go to Record/Request/Page [First]
Loop
If [DatabaseName::Date < Get(CurrentDate) - 30]
Show Custom Dialog ["30 or more days late"]
If [Get(LastMessageChoice) = 1]
Halt Script
Else If [Get(LastMessageChoice) = 2]
Go to Layout ["Late Notice"]
Print []
Else
Send Mail [To: DatabaseName::Client; Subject: "Late Notice";
Message: "Your account is past due."]
End If
End If
Go to Record/Request/Page [Exit after last, Next]
End Loop
Go to Layout [original layout]
Go to Layout ["LayoutName"]
Go to Record/Request/Page [First]
Loop
If [DatabaseName::Date < Get(CurrentDate) - 30]
Show Custom Dialog ["30 or more days late"]
If [Get(LastMessageChoice) = 1]
Halt Script
Else If [Get(LastMessageChoice) = 2]
Go to Layout ["Late Notice"]
Print []
Else
Send Mail [To: DatabaseName::Client; Subject: "Late Notice";
Message: "Your account is past due."]
End If
End If
Go to Record/Request/Page [Exit after last, Next]
End Loop
Go to Layout [original layout]