Go To Layout [Assignee]//any layout that refers to this table
Enter Find Mode 
Set Field [Assignee::accountName ; Get ( AccountName ) ]
Set Error Capture [on]
Perform Find 
If [ Get ( FoundCount ) > 0 ] // just Get ( FoundCount ) will also work here
Set Variable [$AssigneeID ; Value: Assignee::AssigneeID]
Go To Layout [Original Layout]
Set Field [Projects::AssigneeID ; $AssigneeID ]
Show Custom Dialog ["No records found for " & Get (AccountName)]
Go To Layout [Original Layout ]
Thank you so much for this! It works great however filemaker seems to freeze (I see an hourglass with the word "esc"); once you click "esc" it brings you to the Assignee layout (if a record is found). If no record is found, it seems to function ok without freezing.
It doesn't like something about the last "set field" step. I replaced that with a custom dialog to display the assignee id and it was correct. I tried to commit it to see if that would resolve the problem, but it didn't.
If it matters, I am using a SQL SERVER datasource.
This script will work smoothly when the data source is a local file so I suspect your SQL datasource is the source of the problem here.
If you have advanced, run the script with the debugger enabled and see where it actually "hangs". If you don't have advanced, you should get a copy as it can solve a lot of designer headaches. In the meantime, insert a bunch of Show Custom Dialog steps to see where the script hangs.
Since interrupting the script leaves you on the other layout, I don't think it ever got to the Set Field step.
Instead of replacing "Set Field [Projects::AssigneeID ; $AssigneeID ]", I added after it the "show custom dialog".
The dialog displays the assignee id, and I hit ok, and it reappears again. Seems like a possible infinite loop.
We don't have Advanced yet - I'm actually testing out the sql server integration capabilities so that we can decide if it's worthwhile.
By putting a series of Show Custom dialog steps in the script, you can detect where exactly the script hangs. This might give you a clue as to which step has an issue with the SQL Server data source.
Problem solved. Forgot there is a last modified field which gets updated, which in turn caused the infinite loop. Nothing to do with the SQL Server data source.
Thanks again and lots of geeky admiration your way!