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 to Excel - What if 2 Related tables w/ mutliple records?

Featured Replies

I was wondering if this is possible (seems like its not to me, but maybe there is a workaround)?

I have a table (Task). It has two related tables (Budget and Funding). Both the Budget and Funding tables can have multiple records for a task.

Is there any way to do an Task export to Excel that will contain all of the Budget records and all of the Funding records?

I understand how I can pull from either the Funding Table or the Budget table individually, but not sure if its possible to include both on the same export for a task.

Thanks for any help!

Since there are no UNION capabilities with FM, you can try and create a temporary table to dump the data into and export that way.

  • Author

thanks, thats exactly what i ended up doing.

is the only way to "dump" the records into the table by doing an "Import Records" script step and point to same file? if so, is there a standard way to point to itself?

thanks!

  • Author

I now have a new dilemma. I created a table that stores the records from the two tables and is then used to produce the extract. Each time the extract script is run i delete all the records in the new table first (prior to importing).

This works well, EXCEPT this is going to be used by several users on a shared database. If two users run this script at the same time, the correct records will not be extracted, as the new table is supposed to be populated with related records for that specific person. if they are run at the same time, all records for both people may be included.

Is there a way to prevent two users from running the script at the same time? or is there any other way around this?

Well there are a couple of ways to handle this. You could allow for multiple people to do it at the same time by adding in a created by field. However, if you have lots and lots of records and you have to delete and reimport for each user the record count can get high.

Another thing you could do is create a one record table for locking. You can have it so that a user will check to see if that record is locked. If not, then you make a field a active so that it locks the record. You can then open a new window, go to the layout that you want to delete and reimport and do your process. Once finished, you would have the script close the window and then commit the orig background window.

So if a user tries to run the process while the first user has the record locked, with an error trap you can prompt the user that it is busy.

  • Author

hi vodka. thanks for the reply. i actually am trying the created by technique, but i dont have it working yet.

i like the record locking technique, but am not sure if i am advanced enough to figure that out.

Hi Deego,

Try to read this thread...

http://fmforums.com/forum/showtopic.php?tid/191268/post/280031/hl/lock/fromsearch/1/#280031

Hope this helps...

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.