You have a one to many relationship between client and test and it appears to be set up correctly.
I think that you want to select a job Number from a drop down and then see that Test record and possibly data from the linked in Client record.
Your Find is the right idea, but it doesn't have to be done manually, You can select from a drop down and then a script can perform a find for that record in the Text table.
Define a field with global stroage and set it up with a drop down list of job numbers by selecting the "use values from a feld" option in Manage | Value LIsts.
Use a script trigger to perform a find similar to the example scripts found in this thread: Scripted Find Examples
Could you help me apply this script to my database. Maybe explain what each step is doing?
Go To Layout [Select a layout based on table being searched]
Enter Find Mode  ---> clear the pause check box
Set Field [YourTable::YourField ; Globals::gField]
Set Error Capture [on] ----> Keeps error dialog from interrupting script when no records are found
Perform Find 
If [Not Get ( FoundCount ) // no records were found ]
Show Custom Dialog ["No records were found by this search."]
Im most confused by the set field part. please break that part down my table which filed?? how do you put in the second part and what is Globals::gfield ???
Also how best is this script used button? on selection of value from drop down list?
When Setting up Set Field, there are two Specify buttons that must be clicked. To get Set Field [Table::Field ; Expression], add set field to your script and click the first button (specify target field). Select Table::Field from the list of fields. Do not click the specify button next to the repetition box. Click OK to close this dialog box. Now click the lower specify button (calculated result) and create the expression to the right of the semicolon (;). Do not try to type in the semicolon.
Think of when you perform a find by hand. You enter find mode and then enter search criteria into the fields of your table as required for you search. Before clicking perform find. If you look at the script, you'll see that the script goes through the same steps. Set Field is your "personal typist" that is taking the data from the global field and entering it as search criteria into fields of your table while your window is briefly in find mode.
i now have a better understanding of set filed Thank You. Now how do i use that info. I would like to be able to select job number from drop down and navigate directly to that record. Thank you
I would like for the info that is display to contain any data i specifiy
In the pic my global drop down field is bBarCode. Its name that from another forum i was following
I may be making this difficult. It was so easy to do a query in Access
Set up a different field--with global storage as your drop down. Use the OnObjectSave trigger to perform the above script.
I tried that, and it didn't work Can I send someone my file? and maybe you can figure out where I'm going wrong. Thank you for all your help. Im sorry for being so ignorant know its frustrating
Instead, please describe how it "didn't work". Also you have at least one layout based on contacts and one layout based on Test db. On which table is the layout where you tried to set this up based? (What is selected in Show Records From in Layout Setup....?)
Im not sure how to describe how it didn't work. Im sure that i'm missing a step the layout is set to Test Db. them the script runs nothing happens.
Please bear with me and let me start from the top.
I created two tables Contacts, and Test Db ( which will be named Job Db later ) The Contacts table contains a PK field __PKClients ID its a number and auto enter serial. the other fields are Client Name, person in charge, address, city, state, zip The second Table Test Db contains a field named Job Number ( it is auto enter serial ) the next field is Client_ID ( I believe this is called my Functional Key ) the other fields are client name, address, city, state, zip, and location. I will be adding more later. The relation ship currently between the tow tables are one to many as shown in a previous post.
The layouts i am attempting are, first a simple new record the first field will be Job Number ( which will hopefully be auto populated.) the second is client name, address, city, state, zip, and job location. I would like the Client Name to be a drop down box which contains all of my clients names, and when selected will auto fill address, city, state, zip. I have had trouble getting that to work with my current relationship setup. If i change my relationship to Client name - client name it works fine. Please any thoughts on this, am i doing this correct of should i be attempting this in a different way?
The second layout which is the one we have been discussing it this post is, Job Number ( which i want to be a drop down box which when selected will show the record relating to the particular job number. ( job numbers are never duplicated ) The fields should show Client Name, address, city, state, zip, and location.
Thank you in advance, I think with a little help i can get the hang of FM pro.
Ok I'm looking at a tiny iPhone screen on the way back from the doctor. I suggest removing set error capture from your script and then test it. Let me know what error message pops up. That will be a useful clue.
There is no error the script runs and the find screen appears. It is waiting on me to input criterial and click perform find. which is what i am trying to avoid.
So i have created a new global field called find ( it is a text field ) then i put this filed on my form and set it to be a drop down box with the value being pulled from Job Number ( is this where I'm going wrong?). Then i tell it for preform script trigger on save. What happens is it just enters find mode.
Sorry I didn't have the preform find step in my script. I do now and the error is ( The provided find criteria is not valid. Enter a valid request before proceeding)
I suggest posting a copy of your script. So that I can zero in on the several different ways you may have a problem that is resulting in that error.
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 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.