4 Replies Latest reply on Mar 11, 2010 7:50 AM by mrvodka

    Help with updating a group of records from 1 field please

    fluffyone

      Title

      Help with updating a group of records from 1 field please

      Post

      Hi Group

       

      Can someone point me in the right direction:

       

      I have set up a form for a contact database, on this form is a portal to another database which is related by a unique record number and this stores different phone numbers related to the single contact.

       

      I enter the contact name on the main form in a field in the main database then I use the portal to enter records directly to the portal link database.

      Once I enter the data into the portal row I need, it updates the numbers database and creates the record and it adds the contact name and unique number as an auto look up based on the relationship

      the portal then lists all the data linked to the main database record.

       

      This all works fine and I can add and delete records in the portal, or if I delete the main record it deletes all the related portal records from the second database.

       

      The problem comes if I change the name on the main record, it doesn't then update all the linked portal records???

       

      I am trying to figure out why. I think it is a relationship issue and have been trying stuff since last night but my brain is starting to go foggy!

       

      Can anyone point me in the right direction if they understand what I mean,

       

      Regards

       

      Fluffy

       

        • 1. Re: Help with updating a group of records from 1 field please
          comment_1

          First, you don't need a Name field in the Numbers table - you can (and should) get the name directly from the parent contact record.

           

          To answer your question: a lookup copies the data from the related record. This is useful when you want a copy of the value as it was at the time of the lookup; for example, the price of the product at the time of the sale. Lookup happens when you modify the matchfield in the target record (alternatively, you can force a relookup manually or by script).

          • 2. Re: Help with updating a group of records from 1 field please
            fluffyone

            Hi,  I think I am over complicating this!!

            I kept it short and didn't put the full project in the post,

             

            the reason why the name is there is because the collected data is used for other things, i.e. I have a similar setup for emails and the collected name is so when I run an email campaign it will use the name and email for the campaign.

             

            I am looking for better ways to do this. I think I am complicating it a little as I am changing a database with over 5000 records in as opposed to starting from scratch.

             

            Basically I have a main contact database - each record shows the main client- each client is likely to have more than one contact- and each contact is likely to have more than one phone number, web address, email etc..

             

            I have the main table

            I have a contact table

            I have a phone number table

            I have a web address table

            I have a email table

             

            they are all linked to the main client reference number which is unique.

             

            I have got it all working in general, but it is displaying and editing all the data from one screen which is confusing me a little.

             

            I am using portals which work well but I seem to need a multi portal-portal if possible?

            I.e.:

            on the main form have the main client detail

            then have a portal which lists each contact with their singular details (first name, last name position etc..)

            then in this row have another portal that shows all the contacts emails and another for phone numbers and another for web sites.

             

            And then this repeats for each contact

             

             

            Is this possible?

             

            Regards

             

            Fluffy

             

             

            • 3. Re: Help with updating a group of records from 1 field please
              comment_1

               


              fluffyone wrote:

              the reason why the name is there is because the collected data is used for other things


               

              It makes no difference: instead of using the name from the Phones table, use the name from the Contacts table.

               

               

               


              fluffyone wrote:

              they are all linked to the main client reference number which is unique.


               

              That doesn't sound right. Contacts should be linked to your main table (why not call it Clients) by ClientID. Phone numbers should be linked to Contacts by ContactID (unique identifier in the Contacts table), etc.

               

               

              You can't have a portal in portal - but you can place a portal to Phones on a layout of Client.