4 Replies Latest reply on Jan 28, 2014 8:42 AM by disabled_dconnect

    copy 3 fields from main table into 3 fields of each portal record in portal

      Title

      copy 3 fields from main table into 3 fields of each portal record in portal

      Post

           Hi,

           I have a button on each row of my portal that uses Set Field to copy three fields from the main table into three target fields in the record of the row the button is on.

           I go down the portal clicking on these buttons to populate each row's target fields with the three fields from the main table.

           I want to have a button that I click that will copy the three main table fields into the target three fields of each row/record in the portal as this will save a lot of time.

           How do I do this?

           Thanks

        • 1. Re: copy 3 fields from main table into 3 fields of each portal record in portal
          philmodjunk

               This is possible, but why is it necessary. Such an update raises the possibility that these fields should not be defined in the portal's table in the first place.

               Go to Related records can pull up a found set of all portal records on a layout based on the portal's table.

               Replace field contents can then update them all in one batch operation.

          • 2. Re: copy 3 fields from main table into 3 fields of each portal record in portal

                 Thanks Phil,

                 I need to do it this way as each portal on each main table record will get different entries into the three fields.

                 On average, I have about 200 of these to do.

                 If I do find then replace field, I would need to do this 200 times.

                 The filter on the portal picks for each main table record results that match the individual main table records.

                 I tried loop and go to next row ... but I couldn't work it out.

                 Basically, I need a button that puts the individual results on each row, rather than clicking 2 to 10 buttons on each row when I go into each main table record.

            • 3. Re: copy 3 fields from main table into 3 fields of each portal record in portal
              philmodjunk

                   If I do find then replace field, I would need to do this 200 times.

                   What I am describing would be a looping script where the script does this all as a batch operation. The tricky part is to be sure to flip back and forth between layouts at the correct time.

                   #perform a find or something to pull up a found set of your layout table records:
                   Go to Records/Request/Page [first]
                   Loop
                      Go to Related records
                      Replace field contents
                      Go to Layout [original layout]
                      Go to record/request/page [next ; exit after last]
                   End Loop

                   But I still don't see a reason why this data should be copied to the related table. If you have this relationship:

                   LayoutTable----<Portal Table

                   And the values of these three fields in the portal table should always match the values in the related LayoutTable record, then these fields should be kept in the LayoutTable and no data should be copied over. Only if you need to allow subsequent edits of this data in one table or the other to create situations where the data is no longer identical for related records, should you copy over this data from the parent record.

              • 4. Re: copy 3 fields from main table into 3 fields of each portal record in portal

                     Thanks Phil,

                     I'll start looking into that.

                     What I am trying to achieve is thus:

                     I have a main table with client records.

                     Each client record has a portal for the staff that work for the client.

                     Each staff record has three blank fields in the portal row.

                     I have three fields in the main table client row that I bespoke for the email I will be sending to them.

                     My first task is to go through the 200 client records and add the bespoke details into each of the three fields.

                     Then I go through the group again clicking the Yes button in my email merge field on each staff member in the portal I want to get the email.

                     Then all the staff members on each record that will get the email go into the email merge portal as its filter is set up only to show those with the Y button selected.

                     Then I go to the beginning again and scroll through the 200 records on my email portal tab, and I click to add these three fields from the main table field into the staff members that I have chosen to receive the email.

                     This way each company's email is bespoke.

                     The way that I am doing it at the moment is in the final stage I click the button on the staff member's row and it transfers the data over.

                     But when their are 10 members on the record's portal I started to think maybe there's a button to do it all in one go?

                     I hope this helps explain my goal.

                     Thanks again for the help :)))