• 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: Loop through portal using applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loop through portal using applescript


  • Subject: Re: Loop through portal using applescript
  • From: Pier Kuipers <email@hidden>
  • Date: Fri, 26 Jan 2001 01:02:33 +0000

Is there any way to loop through portal data using applescript.

I have done this before, but by bypassing the portal altogether and instead using Applescript to find the related records. It goes something like this:

tell application "FileMaker Pro"
-- go to the Filemaker database with the portal
go to database "MyDB"
-- go to the layout displaying the portal
go to layout "PortalLayout"
tell window "MyDB"
-- get the data that connects the database to the related records in the portal
set LinkField to (get data of cell "MyLinkField" of current record) as text
end tell
-- now go to the related database
tell window "MyRelatedDB"
go to layout "MyLayout"
-- go and find the related records
delete every request
create request
set cell "MyLinkField" of request 1 to LinkField
find
set x to count records
set y to 1
set theList to {}
repeat with i from 1 to x
go to record y
set theList to theList & (get data of cell "MyOtherField" of current record)
set y to y + 1
end repeat
end tell
end tell

You should end up with a list with the data of each field separated properly, instead of concatenated. Hope this helps.

Pier.
--
Pier Kuipers
Visual ID
* the Media Asset Management solution *

2 Whitefriars
Aungier Street
Dublin 2
Tel. +353 1 476 7059
Mobile +353 87 294 3063
Fax +353 1 478 1366
ISDN +353 1 602 0754

http://www.visualid.com


References: 
 >Loop through portal using applescript (From: Lorne Golden <email@hidden>)

  • Prev by Date: Re: perform applescript in FM
  • Next by Date: re: Unmount network volume
  • Previous by thread: Loop through portal using applescript
  • Next by thread: Network Setup Scripting Troubles
  • Index(es):
    • Date
    • Thread