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.

Script Help: Export Record as Excel - Current Record; How to restore the previous found set?

Featured Replies

Hi all,

I need some help again. I understand FileMaker provides two different script steps to "output" an Excel file:

1. Save Records as Excel

Positives:

  • Provides the ability to select CURRENT or FOUND SET of records.

Negatives:

  • Does not provide the option to select which fields to "save"
  • Does not provide the option to select the order of the fields when being "saved".

2. Export Records

Positives:

  • Provides the option to select which fields to "export"
  • Provides the option to select the order of the fields when being "exported".

Negatives:

  • Does not give us the ability to select CURRENT or FOUND SET of records.

I need to use the "Export Records" script step:  I have to have the features of field selection and field ordering.

PROBLEM:

When I use the Export Records of only the CURRENT record, I am unable to restore the "found set" that existed prior to the script being activated.

I added a "Perform Find" script step to isolate just the "current record" and this does export the CURRENT record just fine. However, my FOUND SET that existed prior to script activation is obviously gone because of the Perform Find script step I had to use to isolate CURRENT record.

QUESTION:

How do I "restore" the found set that existed prior to activating the script?

MY RESEARCH

I have searched and came across a few "methods", such as:

  • Custom Functions
  • Summary Lists
  • Creating another Table Occurrence
  • Opening a New WIndow
  • Etc.

If any one can help, I appreciate it - thanks.

Edited by dmontano
Topic clarity

2 hours ago, dmontano said:

How do I "restore" the found set that existed prior to activating the script?

The simple method is to open a new window, isolate the current record and do the export. Then close the current window to return to the original found set.

Alternatively you could switch to a layout that has the fields you want in the order you want them and do Save Records as Excel from there. But if that's all such layout would be used for, it's hardly worth the effort.

 

  • Author
1 hour ago, comment said:

The simple method is to open a new window, isolate the current record and do the export. Then close the current window to return to the original found set.

Hi Comment,

I just tried this and it worked - thank you!

I did not have to create a new layout, a new TO, a new relation, global field, etc. Thank goodness!

I just added a couple script steps (#1 and #4 below) ordered as shown below.

Script Step 1:

  • New Window; Style: Document
  • Window Name:  (I used the same name as the original window)
  • Using Layout: Current

Script Step 2:

  • Perform Find — To isolate the "Record to Export"

Script Step 3:

  • Export Records

Script Step 4:

  • Close Window: Current Window
  • 2 weeks later...

It provides yet another method to capture and restore the found set. But I believe it will be still be simpler and faster to keep the original found set intact, as suggested above.

 

  • Author
3 minutes ago, comment said:

It provides yet another method to capture and restore the found set. But I believe it will be still be simpler and faster to keep the original found set intact, as suggested above.

Thank you. I was weighing if purchasing an upgrade was "worth" it to me - and if I adopt "new feature" ways of doing things.

I can tell you for sure I would upgrade if FileMaker just added these features:

  1. Folders for Value Lists;
  2. Folders for Table Fields;
  3. Folders for Custom Functions;

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.