5 Replies Latest reply on Mar 1, 2014 9:35 PM by philmodjunk

    Did I do something wrong? Only data from one table can be entered on my form.

    bokenrosie

      Title

      Did I do something wrong? Only data from one table can be entered on my form.

      Post

           I created a set of tables according to the attached relationships picture.

           I have three tables. 

               Customers (customers have multiple locations) 

               Locations (locations have multiple contacts)

               Contacts 

           When I created my form everything seemed to go well but only data from contacts can be added to.

           Did I do something wrong?  Is there, perhaps, a simple relational table tutorial someone can point me to?

           Thanks, in advance.

      Locations.JPG

        • 1. Re: Did I do something wrong? Only data from one table can be entered on my form.
          philmodjunk

               And one which of the three tables was your layout based? Is "Allow creation of records via this relationship" enabled for Locations in the customers to Locations relationship? Is it enabled for Contacts in Locations to Contacts?

               Did you add a portal to Locations on your customers layout? (assuming that your layout is based on customers...)

               What you have defined are one to many relationships. You won't be able to create and edit more than on related record from the "many" side of the relationship without adding a portal to your layout.

          • 2. Re: Did I do something wrong? Only data from one table can be entered on my form.
            bokenrosie

                 Aha! I had not told the relationships to allow creation of records.  That is sorted out.

                 I have a Locations portal as the child to the Customers.

                 Now I need a contacts portal to the locations parent and I cannot seem to figure that one out? Any thoughts?

                  

            • 3. Re: Did I do something wrong? Only data from one table can be entered on my form.
              philmodjunk

                   Put the contacts portal on a locations layout and it will work just fine. You can't really set up a portal to Contacts on your Customers layout for adding new records as there is no direct way to specify which locations record should be the parent of that contact.

                   You may want to set up a system where you click a button in the Locations layout to select it as the current parent location and then a portal to a different occurrence of Contacts can display just the contacts records for that location. This is called a Master-Detail pair of portals: Need layout solution for nested portals...

              • 4. Re: Did I do something wrong? Only data from one table can be entered on my form.
                bokenrosie

                     Let me take a step back and give more context on what I'm trying to do.

                     The Contacts in the third table will be the ones that order an individualized notice.  The notice will need information that is stored in Contact table (name of contact, email, phone number), Locations table(office name, address, city, state, zip),  and Customer table (Customer Name, and logo file)

                     * I do not need to edit this all at the same time so it is perfectly fine to have a Company Layout that has portal to Locations and a Locations Table that has portal to Contacts.

                     * On the notice page I need to choose the contact name and the contact address (it is possible that contacts might operate on two different addresses but I think I am okay with the notion of having multiple contact records if that is simpler to do that the alternative.

                     Does still sound like I need to follow the above-mentioned advice?  I have this vision of a search window on the notice page where I search, say, for Joe User.  The found set comes up with all joe user names in my database.  I select the right guy and then when I go to create the notice all of the related tables will give up the correct information.

                     Thanks.

                • 5. Re: Did I do something wrong? Only data from one table can be entered on my form.
                  philmodjunk

                       My advice listed two options that both work.

                       But if you are going to select a contact and then want to see all related info, the data from the location record and the Customers table, you can perform a find for that contact on the contacts layout and that layout can include any fields that you need from Customers and Locations.

                       That works because from the starting point of a contact record, you have a many to one relationship to the other tables--there will be only one related record from locations and only one from customers. This allows you to just add fields from those tables to your contacts layout as though they are fields from the contacts table.