1 Reply Latest reply on Apr 26, 2017 7:26 AM by philmodjunk

    Move Record from one Table to Another Table


      Hey FM Community!


      I think adding context to the question I'm asking would be helpful for the beginning!



      I recently separated two tables, one for volunteers and one for applicants for a volunteer position. In these tables, we store details such as name, address, the usual user personal information. I know separating it might not make sense when a lot of the data will be the same, but it was more so to create a clear distinction between the two supposed to having  one table with both volunteers and applicants.



      We are currently using FM Cloud, FMP and FMP Advanced 15.



      I want to create a button that moves the record of an applicant to the volunteer table, whilst deleting the applicant record once transferred. The field names are all exactly the same. I'm really struggling with such a simple script and was hoping for a little bit of guidance! Apologies for asking such a rookie question! If you need any more context, please don't hesitate to ask!


      Thank you in advance, and I hope you're having a great and productive day!!!

        • 1. Re: Move Record from one Table to Another Table

          There area  number of ways, but I do not agree with your decision to have two tables. There are many ways to keep applicants and volunteers apart without splitting them into two tables. Doing so can limit some of your options for how you work with this data. Limits that you won't have if you keep them together in one table.


          But Import records can import a found set of records from one table to another, even if both tables are in the same file. So you can isolate an applicant record in a found set of just one record, then import it to volunteers followed by deleting the applicant.


          A script that transfers the data one field at a time using set field and a technique called magicKey could do this.


          A script that copies each field's value to a variable, switches layouts to a layout based on Volunteers before creating the new record and using set field to copy the data from the variable to the new record could also be used.

          1 of 1 people found this helpful