Re: Pulling Data from AppleScript
Re: Pulling Data from AppleScript
- Subject: Re: Pulling Data from AppleScript
- From: Malcolm Fitzgerald <email@hidden>
- Date: Thu, 17 Dec 2015 13:47:29 +1300
Hi Jon,
The FileMaker applescript library has always provided you with two
ways of approaching the database. One way is to use
documents/windows/layouts which is very similar to the GUI. The
other way is to speak to databases/tables. The second approach is
not interested in layouts or GUI and does not recognise them when
you talk about them.
Use the document/window/layout approach when you want to control
the GUI. Use the database/table approach when you simply want to
get/set data without reference to the GUI.
Malcolm
On 17/12/2015 12:05 pm, Jon Rosen wrote:
Here’s an update of what I discovered about writing to a FileMaker
table from AppleScript, in case it may be useful to someone else.
I only found one syntax that would work reliably and I’m going to
stick with it unless I find something better. When it comes to
FileMaker and AppleScript, FileMaker no longer seems to care about
layouts, but it does care about the specific TO you are using.
This example script gets the unique ID of the record and then
writes to that record. The syntax is thankfully simple and it is
fast.
tell application
"FileMaker Pro Advanced"
tell
table
"REQ__Requests__Request_items" of database
“ABCDE"
set
recID to (ID
of every record
whose cell
"REQ__Requests__Request_Items::Request_Item_No" = recNo)
set
cell
“result" of record ID
recID
to myData
end
tell
end tell
- Jon
On Dec 15, 2015, at 4:05 PM, Malcolm
Fitzgerald < email@hidden>
wrote:
Current Record is a property of a window,
which is contained by a document.
When you address an element of a window you'll get the
value of current record.
Malcolm
_______________________________________________
Do not post admin requests to the list. They will be
ignored.
AppleScript-Users mailing list ( email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives:
http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden