TOs along with fields, layouts, scripts etc. are your building materials. Keeping things tidy is understandable but don't let that overshadow your more important needs. There was a time when I first started where adding TOs or fields for one small thing or another seemed odd to me as well. If it wasn't for storing the core data it didn't seem to belong I guess.
Anyway, all I'm saying is don't get hung up on it. If it needs a TO. Add a TO. That's how it's done.
That "20 table occurrences" statement sparks a design question:
Do you have multiple fields defined in the same record so that you can list multiple part numbers for the same record or do you have a portal to a related table so that you can list the parts in this portal?
Using the portal instead of multiple fields simplifies a lot of issues for you--including needing just one relationship to implement your lookups instead of the 20 relationships I suspect you may have.
If you are interested, I can post a download link to a Demo file Comment created that illustrates this approach.
Thank you for your reply yes i have the 20 fields in the one record and its pretty messy.
I would be interested in the demo file and the portals but just have never gotten my head round them!!!
One other question i had was say if you have address fields ''bill to'' and ''ship to'' i have drop down on both address 1 fields and a set variable script at the moment that when you press the button it copies the address into the ''ship to'' fields.
However i was wondering say if you had 3 addresses for one company you picked one for bill to and when you clicked the drop down for ship to it gave you just the company you entered in bill to. Like a filter?
Thanks appreciate help
Here's the link. It was created by another user, who goes by "Comment", but it's an excellent, simple example of this approach. Feel free to follow up with questions after you download it and look at it.
For your last question, you are referring to a "conditional value list". Here's a link on the subject: Custom Value List?
There's also a knowledge base article on conditional value lists you can look up, if you select that option from the Support menu at the top of this screen and search under that title, specifying FileMaker Pro.