4 Replies Latest reply on Sep 16, 2016 2:01 PM by David Moyer

    Batch update?

    ezeitgeist

      I'm wondering, is it possible to do a batch update (create new multiple records) to a whole bunch of records from a single set of global fields?

       

      I've created a project that has Contacts and a Meetings log. I want to be able to create a new meeting (each is its own record) for multiple Contacts at once. As in, if I have 500 contacts, I want to be able to check off Bill, John, Susan, Sarah, and Hank and create a record for each saying that I sent out a client update to each of them. I could go in and create a new record for each of them, one at a time, but I'm wondering if there is a way I could do a batch update somehow? This would only be for when I do more of an email blast or the like. The Meetings and the Contacts are associated by the Contact_ID from the Contacts table.

        • 1. Re: Batch update?
          David Moyer

          Hi,

          something like this:

          go to layout 2 (based on table2)

          Loop

            new record

            set field 1 with table1::g_data1

            set field 2 with table1::g_data2

          end of loop

          • 2. Re: Batch update?
            ezeitgeist

            How do I get it to only apply to a select number of the contacts and not all of them though?

            • 3. Re: Batch update?
              philmodjunk

              What exactly are you doing when you:

               

              check off Bill, John, Susan, Sarah, and Hank

              What you will need to to do is gather a list of the contact IDs into a variable or global field and loop through those values while creating your records. When your index reaches the last listed ID, your loop exits. But how you gather that list will depend on how you set up your layout. I'd put a button next to each contact such that clicking the button runs a script that checks to see if that contact ID is in a global variable. If it is, remove it. If it is not, add it. This replicates the function of a check box and you can even set up your button to look and act like one by making use of the "hide object when" setting.

              • 4. Re: Batch update?
                David Moyer

                go to layout 1

                perform find

                Loop

                  set variable $data2 = ...

                  set variable $data3 = ...

                  go to layout 2

                  new record

                  set table2::field 1 with table1::g_data1

                  set table2::field 2 with $data2

                  set table2::field 3 with $data3

                  go to layout 1

                  go to next record

                end of loop