• 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
Re: Pulling Data from AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: Pulling Data from AppleScript (From: "email@hidden" <email@hidden>)
 >Re: Pulling Data from AppleScript (From: Malcolm Fitzgerald <email@hidden>)
 >Re: Pulling Data from AppleScript (From: Jon Rosen <email@hidden>)

  • Prev by Date: Re: AS Library Question
  • Next by Date: Re: AS Library Question
  • Previous by thread: Re: Pulling Data from AppleScript
  • Next by thread: Re: Preventing extraneous output from osascript -l JavaScript
  • Index(es):
    • Date
    • Thread