March 13, 20223 yr I am trying to export records from filemaker to excel. However, I need some records to be duplicated 1-4 times in seperate rows in excel if those fields are occupied with a text value in the filemaker record. I need those values to appear in the following excel rows. Any help will be highly appreciated.
March 14, 20223 yr You might need a temporary “scratch” table for the export where a script creates the records. Or, a virtual list.
March 14, 20223 yr Author Thank you so much for your response. can the script be something like this: loop through the browsed records, if field x is not empty, duplicate the record and so on for all other fields? and then export to excel from this table. On the other hand, I need to learn about the virtual list! I cannot thank you enough for your answer.
March 14, 20223 yr This seems quite similar to: https://fmforums.com/topic/108724-insert-row-between-each-record-on-export-records/ So the first question would be: must the exported file be in .xlsx format? 6 hours ago, nabil deeb said: can the script be something like this: loop through the browsed records, if field x is not empty, duplicate the record and so on for all other fields? and then export to excel from this table. I don't think you want to duplicate the original records in their original table. That would make the original data unusable for any purpose other than the export. But you certainly could do this in a "scratch" table, as suggested.
March 14, 20223 yr Author Yes, I need the exported file to be in .xlsx format. and sure, I do not want to duplicate the original records in their original table. Thank you, I will give it a try.
March 14, 20223 yr Good. BTW, you don't have to loop. You could do something like: 1. Find the records you want to export in the source table; 2. Delete all records in the target ("scratch") table and import the records from the source table; 3. In a new window, constrain the found set in the source table to records that have data in field X and import them into the target table; 4. Close the new window and repeat #3 for any additional fields; 5 If necessary, sort the records in the target table to keep "siblings" together.
Create an account or sign in to comment