cancel dialog button doesn't quit Filemaker pro
cancel dialog button doesn't quit Filemaker pro
- Subject: cancel dialog button doesn't quit Filemaker pro
- From: Janis Rough <email@hidden>
- Date: Tue, 18 Dec 2001 17:18:15 -0800
I have the first script working within filemaker pro except for some
reason when you click cancel it still proceeds through the rest of the
script and creates a P.O. I assume you have to capture the result of
the user choice and insert another if then clause in the Else statement,
but I wonder why? I thought if you hit the "cancel" button it cancels
the script or does it just cancel the dialog?
If (isempty(field))
perform applescript:
Try
set v to cell "g_vendor_id" of current record
set the user_choice to the button returned of the result
{display dialog "Do you wish to create a Lettershop P.O. for
Vendor ID#"&
" "& v&"?" default button 1 buttons {"okay","cancel "} with
icon 2}
end try
exit script
else
perform applescript:
Try
set v to cell "g_lettershop_id" of current record
set the user_choice to the button returned of the result
{display dialog "Do you wish to create a Lettershop P.O. for
Vendor ID#"&
" "& v&"?" default button 1 buttons {"okay","cancel "} with
icon 2}
end try
perform external subscript
end if
----------------------
something like this?
if the user_result is "cancel"
tell application "Filemaker Pro"
exit script
end tell
end try
thanks,
Jansi