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.

Exporting Child Records

Featured Replies

I have a parent file and 2 child files. The user selects a found set in the parent file to export. How do I export the related child records into their own files? Will FM make the records in the child files the found set automatically when it creates the found set in the parent file?

There could be two ways of doing this, depending on whether you want the *records* exported or just the *data*.

To export the records will be hardest, it may mean exporting the master records then using a looping script to go to the first exported master record, go to its related records and export them, then return to the master database and go to the second exported master record, go to its related records, export them... etc. A lot of work and a lot of export files to try to make sense of.

If you only want the related data, I'd suggest creating a calc field in the master database that uses the Design function to concatenate all the related record values. Depending on the export file delimiter, you may have to massage the calc field to create a menaingful string out of the related values.

I've done something like this before and it works well.

  • Author

I need the records, not the data. Besides, I'm doing a kiosk, and I've found that design functions that reference file names don't work after being run thru Developer Tool...the file references don't get changed.

Then it's gonna be ugly then...

Unless you do it the other way... bring the related master information inot the related records (through calc fields) then just find and export the related records you want.

Yeah, that'll make it *much* simpler!

It's pretty simple.

after creating found set in master file,gather all key fields in one global field (or by mean of creating an layout with only key field on it and performing script steps

Copy All Records

Paste [gField, select]

or by defining an conditional value list that use the key field )

Now create auxiliary relationships vs your children files from gfield-->rightKey and perform GTRR step with option show only related records followed by perform external script (the export script that you would have to define in every child file)

That's it

Dj

wink.gif

  • Author

Dj:

I'm confused about what you mean by:

Now create auxiliary relationships vs your children files from gfield-->rightKey and perform GTRR step with option show only related records followed by perform external script (the export script that you would have to define in every child file)

Steve

her's an demo file

Dj

Steven.zip

  • 4 weeks later...

I know I'm tired and sleepy this AM, but I don't understand the difference between exporting the data and exporting the records. Explain please??? confused.gif

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.