• 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: FileMaker Pro, get ID's of records found
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FileMaker Pro, get ID's of records found


  • Subject: Re: FileMaker Pro, get ID's of records found
  • From: Gary Lists <email@hidden>
  • Date: Sun, 24 Nov 2002 16:21:46 -0500

On 11/24/02 2:18 PM, Pieter van Helvoirt wrote:

> Hi there,
>
> Does anyone know how to get a list with the FM record id's of all
> records found?
>
>
> Any suggestions?
>
> Regards,
> Pieter van Helvoirt
>


Pieter,


In general, to operate on either the found set or all records, you get:

count of record
-- found records in a file (include found set)

count of record of document 1
-- found records in a file (include found set)

count record of database 1
-- all records in a file (ignore found set)

And then you can use the internal record ID (I assume that's what you
meant), like this:

ID of current record (or ID of record x [of layout x [of document x]])

Here is a short script that I just tested, from the script editor's 'Perform
AppleScript' command.

(works for all records currently "showing"...i.e., "found" or all)
=====================
set foundCount to count of records of document 1
set searchString to "bob"
set IDList to {}
set ifCounter to 0

repeat foundCount times
if cell "person first name" of current record contains searchString then
set ifCounter to ifCounter + 1
set end of IDList to (ID of current record as text) & "|"
-- added '|' just to see the items separated in the dialog box below
end if
end repeat

display dialog "Started with: " & foundCount & " records." & return & return
& "No. records containing '" & searchString & "' was: " & ifCounter & return
& return & (IDList as text)
======================

There are more efficient ways to count AS list items, of course (i.e., after
the list is made).

Also, I use a method of preserving "found sets" across database launches
which relies on internal ID's. To do this, I have a special layout with
only one cell -- containing only a record's internal id (define a calc
field, where calc = Status(CurrentRecordID))

Then, via script you can:


(get) data layout x of document 1


This returns a list of all data of all cells (only 1 in this case) of all
records showing in the first document.

I use this method because it allows me to "return" the dB file to the last
find result state, or to save find's by name. Make sense?


HTH,

Gary
--
Do not reply via email. Incoming replies are auto-deleted.
Please post directly to the list or newsgroup. Thank you!

Really need direct? Rot me at:
email@hidden
Lbhe fhowrpg zhfg ortva "abgwhax:" (ab dhbgrf)
Avpr gb zrrg lbh! Qba'g fcnz zr.
_______________________________________________
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.

  • Follow-Ups:
    • Re: FileMaker Pro, get ID's of records found
      • From: Gary Lists <email@hidden>
References: 
 >FileMaker Pro, get ID's of records found (From: Pieter van Helvoirt <email@hidden>)

  • Prev by Date: Re: FileMaker Pro, get ID's of records found
  • Next by Date: Re: FileMaker Pro, get image by reference
  • Previous by thread: Re: FileMaker Pro, get ID's of records found
  • Next by thread: Re: FileMaker Pro, get ID's of records found
  • Index(es):
    • Date
    • Thread