"Unrelated table" means basically what it says: There's no relationship between the current table (the one on which the layout is based) and the table from which the field is drawn. You either need to create such a relationship, or use the correct table occurrence that already has a relationship to the current one.
My preferred method with correspondence is to use a text field and populate it initially by script with standard text, including specifics inserted from data fields as needed. This method means that the actual text of the letter becomes a field in its own right within a record for the particular item of correspondence, and is then editable as needed to modify it for the particular letter at hand.
The standard text I start with can be stored in its own global field and transferred to the letter content field by script. It can contain placeholders for any data inserts (names, amounts, whatever) and these can then be substituted with the actual data from within the same script.
Your screenshots show, I presume, a series of checkboxes by which you select the content of the letter. This method could easily be built into the method I've described—you could perhaps have a series of standard text globals each representing one of your checkboxes, and the checkbox selection could then be used to determine which to include.
Mike has already beaten me to the punch concerning the unrelated table issue.
Many thanks, I’ll try this method.
Okay that is what I have done, however the problem I have is probably best shown in the attached docs.
I have a fee schedule I wish to populate from different tables, ie Client list, owner list, proposed fee table and a few others. The tables appear to have relationships intact.
I can populate the letter from the client list as the layout setup is linked to that list, but I can't populate the letter with any other table information apart from the client list.
Does this mean I have to have all the fields I want on the letter in the same table, and have the layout setup (fee schedule letter) show records from that table.? Or are the relationships incorrect.......probably..
Sorry for my lack of explanation previously and my ignorance.
No, your relationships appear fine. What you didn't do is include the table occurrence (TO) name in the merge field names for the fields from the Owner list table. They should look like this:
This is called the "fully qualified" field name. It includes the table name, followed by two colons, followed by the field name. It's necessary whenever you address a field that's not in the current context (TO). There are a couple of ways to make sure you have the correct data.
1) Type the field name in all lowercase or all uppercase letters. If it doesn't change to match the case of the field, as defined in the table, then FileMaker didn't make the connection.
2) Use the Insert > Merge Field menu option and select the field from the dialog.