Thank you for your post.
I understand the script to switch from table 2 to table 1 (Go to Layout script step). However, I'm a little confused where you say "How can I append the Table 1 list to also include such notation?". Does that mean, you want a Table 2 list to appear on the Table 1 layout? Or, did you want some information from Table 2 to appear in a separate area? Or, did you just want a button to switch back to Table 2? Can you be a little more specific?
Let's say my Table 1 linked field has 5 records in it, such as A1product, B2product, C1product, C2product and Zproduct. In my normal layout screeen for Table 2, I can easily get a list input that will bring up those five records to establish the proper link via making the input filed a list field linked to Table 1. However, I want to go one step further: what I would like to do is further add to the list "Go to Table 1" and thus show the list like this:
Go to Table 1
The purpose would be that if I was in Table 2 and wanted to make a link whereas the field would be M4product, since that is not already in Table 1 via the list and records at Table 1, I could select the "Go to Table 1" option in the list and run a script that will take me to Table 1, make a new entry for M4product, complete other related data thereto and then go back to my Table 2 screen which would then have the M4product added to the list.
Does that make sense?
Thanks for the additional information.
When you link a value list to related table, you only get those choices that exist in the related file. If you want, you can include a dummy record in Table 1 with the value "Go to Table 1". Otherwise, you will have to create your own custom value list and include all the values from Table 1. Unfortunately, any time you add records to Table 1, you will have to update the custom value list.
Assuming you use what you have now, and you add a "Go to Table 1" dummy record, you then want to switch to Table 1 when you select this option. This can be done through a script trigger, assuming you have FileMaker Pro 10.
First, create a new script "Go to Table 1". The script steps would be:
If [ Table 2::<list field> = "Go to Table 1" ]
Go to Layout [ <Layout with Table 1 data> ]
That is, if you execute this script, and the value in the field is "Go to Table 1", then you switch to the layout that displays the Table 1 data.
Next, pull down the View menu and select "Layout Mode". Click on the drop-down field, pull down the Format menu and select "Set Script Triggers". Put a checkmark in "OnObjectExit" and specify the script that we just created above. Click OK twice to return to Layout Mode. Pull down the View menu and select "Browse Mode".
If you click on this field and select any value other than "Go to Table 1", you'll stay in the same layout. When you select "Go to Table 1", you will automatically be sent to the layout where Table 1 data is displayed.
Please let me know if you need clarification for any of the above steps.
I really wanted to avoid creating a dummy file for the ability to select going to the other table. I fixed the problem by making a dialog box script - if the to be linked field is blank or not a match to Table 1, a dialog box pops up to warn the user and allows going back to edit mode, reverting the record back or go to the Table 1 window.
Thanks, for your suggestion - the clues you gave helped me figure this out...