AnsweredAssumed Answered

How to setup a Checkbox for Record Specific Fields - Email location

Question asked by sailmtry on Mar 30, 2014
Latest reply on Mar 31, 2014 by erolst

All,

 

I'm creating a Popover with a few selected fields so that the user can create a calendar event for the active record (the one they are viewing). I've created an applescript that tells "Callendar" to creat that event. That all works fine for: event time, date, title, summery, etc.

 

However, I'd like to create a checkbox with the phone numer (or numbers) of the current record (not the entire DB) so that when it's selected (checked) it is passed to the new calendar event - in this case an apple script using List () fuction.

 

For instance, let's say that the end users is setting an appointment with the contact (current record) for a call on a later date. The end-user asks the contact if they would prefer to have them call on their "cell phone" or "office phone" or perhaps meet at a physical location. I'd like the end-user to be able to simply click on a checkbox for either "cell phone" or "office phone", etc for that record, instead of having to cut/past the phone number.

 

I tried to create a popup menu as well as a check box, but when I tie that to a "Value List" all the phone numbers in the entire DB are shown. I even tred to creating a field in the DB with a calulated result of Cell phone + Office phone ( result of text) and tied as a value list, but now luck.

 

Many thanks for you help!!

 

 

Running Mac & Filemaker 13

 

Code and screen shot below:

List (

 

 

"tell application " & Quote ( "Calendar" ) ;

 

 

" Set mylocation to " & Quote (Contact Management::Calendar Location ) ;

 

 

"set mysummary to " & Quote ( Contact Management::Full Name ) ;

 

"Set myduraration to " & Quote (Contact Management::Calendar Duration) ;

 

" set myeventdescription to " & Quote (Contact Management::Calendar Description) ;

 

 

"set mystartdate to date " & Quote (Contact Management::Calendar Start Date Time ) ;

 

 

" set myduraration to " & Quote (Contact Management::Calendar Duration );

 

 

"set mycalendar to calendar " & Quote ( Contact Management::Calendar Name) ;

 

 

"tell mycalendar " ;

 

"make new event with properties {description:myeventdescription, start date:mystartdate, end date:mystartdate + myduraration * minutes, summary:mysummary, location:mylocation}";

 

 

"end tell";

 

 

"end tell"

)

 

Screen Shot 2014-03-30 at 4.12.48 PM.png

Outcomes