3 Replies Latest reply on Jun 2, 2013 10:03 PM by brutuswa

    ReNumber K_ID field script



      ReNumber K_ID field script


           After numerous imports from my iPad, I have realised that I should not have imported the k_ID_Contact field  but should have imported the Date Created field   :(

           Too late now ast that unique number is not unique any more.

           So, I have unticked the "Not Modifiable" checkbox and I am going renumber them.

           I am also using the opportunity to sort of group various sections.  Some of which are easy because ther's not too many in those sections, such as Personal, Suppliers, Associates etc

           But when it comes to the Clients section, I have over 700 of them and its going to be quite a job to find the original "Date Created" but I will be able to do that from past backups.  Once I have them in order, I will want to sort them, then renumber the k_ID_Contact as from, say 1001 onwards in the found set.

           Then I can make the field non modifiable again and not make that mistake again.

           So can anyone suggest a script that once I put 1001 in the k_ID_Contact field of the earliest record, will then renumber all the subsequent records in the sorted found set by an increment of 1  only in the found set.


           Brett Curtis

           Master Window Cleaners

        • 1. Re: ReNumber K_ID field script

               I actually worked this one out.

               First I duplicated the database and removed all the records.

               Firstly I imported all the renumbered records. Then I deleted the ID number from the source database imported those records in the sorted order but with the k_ID_Contact set to create as from 1001.


               Problem solved :)

          • 2. Re: ReNumber K_ID field script

                 I believe that you SHOULD import that ID field, but the check box for enabling auto-enter options should not be enabled. Otherwise, the value in the data your iPad may not match the original copy on your computer and that mismatch could have catastrophic consequences.

                 But if you should need to renumber an auto-entered serial number field, you can also use the Serial Number option in Replace Field Contents to renumber much more easily than the steps you've outlined here.

            • 3. Re: ReNumber K_ID field script

                   The serial number replace was what I was actually looking for in the first place, Thanks Phil

                   I did actually do it my way because of impatience, naturally!  It worked ok and I have replaced the ipad file with the new one.  The files get out of sinc anyway as I do most of the work on the desktop version which does't update on the iPad unless I transfer an updated file there.  I only use the iPad file when out in the field seening a new quote.  I then import the new record to the desktop (Without the k_ID) and delete the iPad file and transfer the file back from the desktop with the new client but including any changes I have made on the desktop.

                   If you have a better way, please feel free to suggest.

                   I have a FMP tech coming tomorrow to help with the installation of 360 works email sync and also possibley Ical manipulator.