Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Export Excel with related records

Featured Replies

Hi,

I have a table A with records. They are linked to table B, 1->n. I need to export the records of A and B in Excel. Everybody knows that the good way to do so is to go in table B and to export the records of B and the linked data of A :B one row for each record of table B.

But... I need to export ALL the records of table A, and NOT all records of table A have related records in table B... So, if I am in table B before to export, I have no access to some records of table A... (those without linked records in :.

I tried to find an answer in the forum, but whitout success. For me, the only solution is to start the export from a model of table A, but how to succeed in exporting the related records of table B in such a way that each record of B creates a row in Excel ? For the linked records of B, it is nor necessary to have the related data of A on the same row, but it is necessary to create one row by linked data of table B.

Is it possible ?

Thank you !

How about creating a reporting table, that at the end of the script which loops thru A has all the records that you'll need for excel?

Start in A, and if there are children, gtrr put those records in the reporting table, back to A. If not, put the record in A. Next A record.

It goes against the natural order of relational databases, but I agree with bcooney.

Move the records into a separate table using a script. Export, then either delete the records in the reporting table...or save them to append to later.

FM doesn't have left outer-joins. So, this kludge is the only way.

this kludge is the only way.

I believe exporting as XML with a custom XSLT stylesheet could be useful here.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.