1) Is there a way or a script that would allow me, when I select a Tenant in the Tenant Portal to not only see the detailed Tenant Information in the Tabbed Section but also see the last Contacts Made in the Contact Made Portal?
The same basic method you used to "synch" your Tenants portal with the portal on the Tenant Info tab should also work to display the contact records for that tenant in the Tenant Contact Info. Can you describe how/why that isn't working for you?
Are you using this tenant contact portal for data entry? If you are using portal filtering, there may be an issue with entering data for a new contact record that is then filtered out of the portal when you exit the portal. If that's the case, please post the filter expression you tried to use.
2) is a question that deserves a thread of it's own, given its complexity. I don't have enough information to answer. What table is the above layout based on? Building I presume?
Since you appear to have this relationship: Building---<Building_Owner>----Owner
You can place a portal to Building_Owner and add fields to it from owner to list the owners for the current building record. Assigning a new owner record can be down with a drop down to Building_Owner::Owner# with the value list set up to list owner#'s and names from the Owner table. That drop down would only allow you to add owners that already have a record in the owner's table and you'll know if such a record exists by whether or not they are listed in the drop down. I'd then add a separate button for adding a new owner record to owner and then using that new record's Owner# to create a record in Building_Owner with the correct numbers to link that new owner record to the current building record. That script could check for matching owner information before creating the record by performing a find for that information before creating a new record. If no records are found, create the record. If a record is found, display it and ask for confirmation since two owners could have the same name.
Response to #1: During construction I did convert to use this for data entry since everything was right there. The filter expression I have is: $$SelectedTenant = JunctContacts 2::Tenant#. Instead of "JunctContacts" I had started with the Contacts Made table but there isn't a Tenant# established in that table so I moved to the junction table. The problems: It seems to work for the first tenant but doesn't pull up any records when the second tenant is selected. I entered two entries for the second tenant through this screen and when I reviewed the records two errors occured: 1) it set the contact up under the first tenants Tenant# and 2) it did not show those records under either tenant's list in the Portal. I manually corrected the Tenant# in the JuncContacts table and they still didn't show up after selecting either Tenant record.
Response to #2: The layout is based on the Building table. Building table has relationships with Owner, Tenant and Sales Comp. And then Contacts Made is related off from Owner and Tenant tables. There are junction tables between Building and Owner; Building and Tenant; Owner and Contacts Made; Tenant and Contacts Made. My buttons that were creating two records were based off from the Owners table not the JuncOwners table...I will try that course.
FYI: Access was too difficult for me to learn last year and when I learned of FileMaker I was reinvigorated to try to get my database set up. I have little experience and know basically only what I've read in the last month. Some of these "options" are "dreams" and if they become too complicated or beyond my understanding I will accept what I have and mannually try work arounds. I'm concerned that if I don't understand it, I won't be able to correct or adjust the database once it is established and working with live data.
Thanks for your assistance.
The details are critical here. Are these your relationships? (Subsitute your join_table [junction] names for mine).
You mention using a "junction" table for contacts made, but I'm not seeing a reason for that join table.
Relationships correct except, I only have one Contact Made table and both Owner and Tenant tables connected to it. In the second connection a second version of the tables were automatically made so they look as follows:
Owner table; Tenant table; JunctContacts table; Contacts Made table
Tenant----JunctContacts 2-----Contacts Made 2
Honestly not sure why I created the junction table, all it contains is four fields (Junction#; Tenant#; Owner# and Contact#) It was a way for me to bridge each Contact back to an individual Owner or Tenant and not the Building. Should I delete it?
I believe this are the actual relationships you should have here:
Tenant-----<Contacts Made 2 (----< means "one to many" )
Join tables allow you to match many records in one table to one or more records in another table. Multiple owners can own multiple buildings and any given building can have more than one owner, for example.
If I'm understanding you correctly, a contacts made record links either to one and only one owner or one and only one tenant. (But a given tenant or owner can have more than one contacts made record.) If so, you can simplify your design and link your contacts made records by an OwnerID for owner contacts and a TenantID for tenant contacts. Use two fields in contacts made, one for tenant IDs and one for owner IDs so that a contact made record won't match to a Tenant and an Owner that happen to have the same contact ID.
Thanks. It sure seems to make a lot of sense as you explain it. I will try this right away.....and again, THANK YOU!
Everything seems to work great...except, (had to be an except):
When I enter new Contacts Made they all are set up with the first Tenant record listed in the Portal for that building. If I go into the Contacts Made table and correct the Tenant# then everything shows up correctly.
I think I can simply add the field "Tenant#" to my Tabbed Tenant Portal and my Contacts Made Portal and manually enter the correct tenant's number shown in either Portal when I set up a new Contact record. Should be an easy work around, but before I do that I want to make sure that I haven't done something incorrectly to cause this...something that would be just as easy to fix.
Are you using a portal filter such as
$$TenantID = Contacts Made 2::TenantID ?
If so, you can use a script performed by a script trigger to add the correct TenantID for you to your new record.
Set Field [Contacts Made 2::TenantID ; $$TenantID]
Set this script to run OnObjectEnter or OnObjectExit on all required fields. (A field that must receive data in order to log the contact.)
Thanks again for all of your help Phil.
I couldn't get the "Set Field" to work for me so I set up the work around, but I'll keep playing with it.