If this is the whole script, it won't do what you are looking to do. For starters, you have to put a value in gField. It appears the gField is where you will type your find criteria, then trigger the script. gField is a global field in the Globals Table. Do you have a Globals Table set up?
This script will only search one field in oneTable
Posting the actual script with the actual details would help. There are any number of picky details that if not set up correctly, will keep the script from working as expected.
But you also want to search two different tables with the same criteria and apparently want to list the matching record from both tables. That will be tricky to do as FileMaker only pulls up matching records from a single table--the table on which the current layout is based. From what little that you describe here, it's quite possible that you shouldn't have two tables like this--each with names in the first place, as it might be possible to treat your clients as one kind of contact in your contacts table.
To post a script to the forum:
- You can upload a screen shot of your script by using the Upload an Image controls located just below Post a New Answer.
- You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here. (with this approach, you can get multiple script steps on the same line, please edit the pasted text by inserting some returns to separate those steps.)
- If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
- If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format.