MACSCRPT Archives

June 2008

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Paul Skinner <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Wed, 11 Jun 2008 17:16:03 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (55 lines)
Bill,

I don't have FMP to test , you might be able to query the cell value  
in the find, but you can definitely do the find.

set yourVariable to "1234456"

tell application "FileMaker Pro"
	tell database "your_db_name"
		
		set findResults to ID of (every record whose cell "somefield" is  
yourVariable)
		
		repeat with thisRecord in findResults
			tell record ID FMPRecordID
				set wantedData to {recordDescription:cell "description",  
recordOtherData:cell "OtherData"}
			end tell
		end repeat
		
	end tell
end tell

Paul



On Jun 11, 2008, at 4:53 PM, Bill Steele wrote:

> This ought to be the most basic, simple thing you could possibly do,  
> so I'm probably missing something obvious.  I want to get the value  
> of a particular cell from a record that matches something in another  
> cell.
>
> In SQL, something like
> select phone_number  from people where name = "Smith"
>
> so why not
>
> tell database "people"
> get cell "phone_number of every record whose cell "name" is "Smith"
> end tell
>
> -->Object not found
>
> Tried get data, show, find, goto, and so on. Always an error.
>
> Every reference on Applescripting Filemaker I've looked at has  
> offered vast detail on how to get field names, table descriptions,  
> yadda yadda.  Not a word about just finding data.
> -- 
>
> Bill Steele
> [log in to unmask]

ATOM RSS1 RSS2