2 Replies Latest reply on May 15, 2015 5:54 AM by paolosalvemini

    Copy records from a table to another one

    paolosalvemini

      Title

      Copy records from a table to another one

      Post

      Hello,

      I'd like to copy records from a table to another one when a condition is met.

      I need to move a record from table "possible clients" to the table "Clients" if the field "became_client" is flagged.

      All the other fields are the same. The script should copy the entire record to the other table and remove it from "Possible clients". 

      I know that maybe the best thing would be use only the table "Clients" but i do need also the other table (It's more confortable for me)

      Can you help me?

      Thanks

        • 1. Re: Copy records from a table to another one
          philmodjunk

          Comfortable or not, I strongly advise that you use just the one table. Creating separate tables will cause problems long term when it comes to reporting, analyzing and keeping your data up to date and in full agreement. It's pretty easy to keep two groups of records in the same table, your "clients" and "possible clients" separate from each other via scripting, relationships, etc.

          But if you insist,

          Import Records can copy multiple records from one table to another.

          Or a script can set a series of variables with the values from one record in one table, change layouts to a layout based on the second table, create a new record and then use a series of Set Field steps to copy over your data.

          There are also ways to use a relationship and auto-enter settings to look up data after copying over a single ID field.

          But from what you describe here, I advise against separating your data into two tables.

          • 2. Re: Copy records from a table to another one
            paolosalvemini

            Thanks a lot. I'll try to do it with only a tabl e and work divide it by scripting...