Filemaker Current Record Number

Hi all, I’m wondering if there is a direct way to reference a FileMaker Record number (within the found set) in AppleScript without creating a field in FileMaker which contains a calculation containing the record number.

Thanks for any help or suggestions!


Model: Mac Pro
Browser: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9pre) Gecko/2008042004 Minefield/3.0pre
Operating System: Mac OS X (10.5)

You can get the record id using the ID property.


tell application "FileMaker Pro Advanced"
	tell database "YourDatabase"
		set x to ID of current record as integer
	end tell
end tell

Thanks for the suggestion Craig, but I’m just wondering if I can get the record number (i.e., record 4 out of 8 found records) rather than the record ID. All information is helpful though. Thanks!



Not sure why you want to work this way but after you have done a sort you can then use this to get the values from record 4 within that sort.

tell application "FileMaker Pro Advanced"
	tell database 1
		set numRec to records of current layout
		set thisrec to item 4 of numRec
	end tell
end tell

to get the record number as shown by FM’s “rollodex”, try this single step …

try -- just in case found set is 0
	tell application "FileMaker Pro Advanced" to tell current layout to count (records 1 thru current record)
end try