• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
FileMaker and Now Contact
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FileMaker and Now Contact


  • Subject: FileMaker and Now Contact
  • From: Christian Boyce <email@hidden>
  • Date: Tue, 6 Apr 2004 22:52:04 -0700

I have an empty FileMaker database that stores information about some of my customers. It has the typical address book fields:

custFirstName
custLastName
custAddress
custCity
custState
custZip

I also have an existing Now Contact database with lots of this kind of information (plus a lot more).

My goal: enter a first name and a last name into the appropriate fields in the FileMaker database, then run an applescript that finds the matching record in Now Contact (based on the first and last name) and brings back the data to FileMaker.

This works (in the Script Editor):

set thelastname to "Smith"
set thefirstname to "Joe"
tell application "Now Contact - OS X"
set NCpersonID to unique id of every person whose last name is thelastname and first name is thefirstname
set NCpersonRef to a reference to person id NCpersonID
set theaddress to work address of NCpersonRef
set thecity to work city of NCpersonRef
set thestate to work state of NCpersonRef
set thezip to work zip of NCpersonRef
end tell


But this doesn't work (in the Script Editor):

global thefirstname, thelastname
tell application "FileMaker Pro"
tell document 1
tell database 1
tell current record
set thefirstname to cellValue of cell "custFirstName"
set thelastname to cellValue of cell "custLastName"

end tell
end tell
end tell
end tell
--
--I have used Display Dialog to verify that I am getting the right values here
--
tell application "Now Contact - OS X"
--THIS IS THE STEP IT FAILS ON
set NCpersonID to unique id of every person whose last name is thelastname and first name is thefirstname
--THAT WAS THE STEP IT FAILS ON
set NCpersonRef to a reference to person id NCpersonID

set theaddress to work address of NCpersonRef
set thecity to work city of NCpersonRef
set thestate to work state of NCpersonRef
set thezip to work zip of NCpersonRef
end tell

The FileMaker part returns the information that I want (a variable called "thefirstname" with value "Joe" and another variable called "thelastname" with value "Smith"). But, when I run the script I get this error:

Now Contact - OS X got an error: Can't get unique id of every person whose last name = "Smith" and first name = "Joe"

So weird! If I supply the last name and the first name explicitly it works. But not if I pull the information from FileMaker.

What am I doing wrong? Why can't I use the information returned from FileMaker to look up a name in Now Contact?

Thanks for your help--

cb


--
Christian Boyce
Macintosh Consultant to the Stars

310-452-3720
http://www.christianboyce.com
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: popup in dialog possible?
  • Next by Date: Re: Quark - setting justification dynamically
  • Previous by thread: Re: applescript-users digest, Vol 3 #2591 - 14 msgs
  • Next by thread: Re: (choose file of type "MooV")
  • Index(es):
    • Date
    • Thread