AnsweredAssumed Answered

Look up related field using Get (Account Name)?

Question asked by fmnewb on Sep 15, 2010
Latest reply on Sep 16, 2010 by fmnewb

Title

Look up related field using Get (Account Name)?

Post

Hello,

I'm just getting into FileMaker so not quite used to the scripting environment...

I have a layout called "Projects". Each project record can be assigned to a person - this is represented by a field called "assigneeId". Assignee Id references another table called "Assignee".

"Assignee" table has the relevant fields:

assigneeId

accountName

...

So on my layout, after the project record is committed, I would like FileMaker to look up the assigneeId based on the current user (I believe "Get (Account Name)" achieves this), and to automatically update  Project::assigneeId, silently behind the scenes.

I know SQL much much better - so maybe an example will help clarify what I'm trying to do - consider trying to update project #1

--------------------------------

UPDATE Project

SET assigneeId = (SELECT assigneeId FROM Assignee WHERE accountName = "whateverCurrentAccountName")

WHERE projectId = 1

--------------------------------

Thanks in advance!

Also, is there an awesome scripting book that anyone recommends....?

Outcomes