AnsweredAssumed Answered

How to merge similar records in FM

Question asked by TvdK on Nov 27, 2013
Latest reply on Dec 1, 2013 by philmodjunk

Title

How to merge similar records in FM

Post

     I've been reading and looking into scripting but i'm afraid i have to admit i'm not much of a programmer and i don't know where else to go with my question. I hope someone is here who can help me. 

     Thing is: i have this database with lots of similar records in it. I'd like to compress it so it only leaves records with some totals (instead of individual earnings). So basically what i need to get done is: if a record contains the same 'Track' and the same 'Katalognummer' (this can be easily be 500 records), all these 'Account total' fields need to be summed, a new record should be created with all previous data in it and the summed 'Account total'. After that, all records that were summed can be deleted so it leaves me in the end with a 'compressed' database. 

     If you look at the screenshots i attached, you'll understand what i mean i hope. 

     I can get the desired result by using 'sub summery' and print it as a pdf file but thats only an 'optical' solution. It still leaves me with the same amount of records. 

     So basically it would like to be able to reduce my database to what i can achieve when using sub summery techniques (as you can see on the images). 

     My best guess is to achieve this result with some scripting, comparing records in a loop, creating a new record, pasting all data in with the new 'Account total' and then deleting all previously looked up records and repeat this process until there are no 'doubles' anymore. But easier said than done, for me

     Anyone out there that can help me ? 

     Would be very much appreciated!

     Thanks

     ton

      

Schermafbeelding_2013-11-27_om_23.10.57.png

Outcomes