The problem is you have to tell FileMaker which record ID you want. Try either of the lines I've indicated below. Note that 'document 1' is the found set. Note that there may be some confusion in AppleScript about 'one' as a variable name. As a string, 'one' would evaluate to '1', a number. I would suggest using another name (e.g., returnValue) to avoid any such confusion. cheers, dj >Hi, > >I am writing a script that should find the ID of a FMP record, then the >ID >will be modified into a link and automatically inserted into a HTML page. > > >The problem is no matter which $r_numb I use, the return is always "te" >(without the quote). Would you please help me out? > >Here is the part of the script that does not work: > >$filemaker_path = 'Macintosh HD:FileMaker Pro 3.0 Folder:FileMaker Pro'; >$db_path = 'Macintosh HD:Releases'; >$get_id_script = <<"END_OF_APPLESCRIPT"; >set DB to alias "$db_path" >tell application "$filemaker_path" > activate > open DB > delete every request > create request > set cell "Release Number" of request 1 to "$r_numb" > find > copy ID of record to one -- try this instead copy (ID of record 1 of document 1) to one -- or this, in a list context copy (ID of every record of document 1) to one > close window 1 >end tell >return one >END_OF_APPLESCRIPT > > >$id = MacPerl::DoAppleScript($get_id_script); > >print "$r_numb $id\n"; > > > >Thanks a bunch for any help! : ) > >-- Patience > ***** Want to unsubscribe from this list? ***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch