how to show all employees of "A" company which tom is in?
Click FInd to Enter find mode.
Type in =="A" into the company field.
Click Perform Find
This will find all records with the exact text of A in the company field.
There are other methods that might be used, but since I know nearly nothing about your database, I have described the simplest most straight forward method.
Thanks, phil. I may not describe clearly. The username is a parameter and changed with the account user. So I need a script to get the records. The key issue is how to get the text of field "company" as a Find condition according to the username.
That's still not completely clear. Does that mean that there is another table of information in your database? Is this the scenario?
A user, "tom" logs in using account name "tom". The script needs to find all records in this other table where a field for "company" is "A". That it?
If so, is there a relationship linking the records in the table you showed to this other table by the company field?
That's not necessary, but if you have such a relationship, it makes things easier.
Some resources that may help you:
Scripted Find examples: Scripted Find Examples
And if you want to limit each user's access to only records for their company: See "Editing record access privileges" in FileMaker Help and check out this particular sub section: "Entering a formula for limiting access on a record-by-record basis" for a description of how to set this up.
Thanks, Phil. The problem is resolved. After Perform Find  and go to the first record, I get the text of the field as the parameter for the next Find .