using a create new request find applescript multiple times
-- I can't figure out what I am doing wrong with this script. It works fine when run once, but if I run it again from a different record it combines the new results with the old ones.
--It seems like the 'delete every request' isn't working or/and the new find is appending the results to the old found set. Can anyone tell me what I am doing wrong?
--it's probably something simple but it is driving me crazy (I know I could do this in other ways but this is a simplified version of a longer script so the current structure is important)
tellapplication "FileMaker Pro Advanced"
go tolayout "initial layout"
setcurrentIDtocell "SID" ofcurrent recordaslist
go tolayout "second layout"
delete every request
repeatwithifrom 1 tolengthofcurrentID
set theFindRequest to create new request
telltheFindRequesttosetcell "SID" toitemiofcurrentID