Presumably you have the following relationship linking these two tables:
mainTable::CustomerID = Addresses::CustomerID
Add an AddressType field to your main table and then update your relationship:
mainTable::CustomerID = Addresses::CustomerID AND
mainTable::AddressType = Addresses::AddressType.
Now format the mainTable::AddressType field as a drop down or pop up of address types and your portal will show the address of the selected address type.
I added the relationship as you suggested, but the mainTable::AddressType list shows all the Address types of ALL the customers, not only the addresses that the selected customer may have.
Also, the addition of the second relationship causes the addresses not to display correctly in the portal.
Please explain what you mean by "causes the address not to display correctly". No data shows before you select an address type? No data after you select? Wrong data entirely?
If you want to limit your list of address types to just those for the current customer, you can set this up as a conditional value list. There's a "show only related values starting from" option in the value list setup dialog. Select this option and then select your main table as your "starting from" table (drop down menu just to the right of this option.)
I solved it myself. I have displayed address type only in a second portal that displays several rows so it shows a list of the address types for the customer. There is a script trigger "on enter" in that portal that finds the portal row of the clicked address title. Then that portal row is selected in the 1-row portal that shows the whole address. The script steps are:
1 - Set Variable [$row; Value:Get (PortalRowNumber)]
2 - Go to Object [Object Name: "Address portal"]
3 - Go to Portal Row [Select; No dialog; $row]
It works like a charm. The user sees a list of the titles of the addresses for that customer which are in the system, and when one is clicked, the address window displays the address.
Thank you for listening....