Jump to content
Server Maintenance This Week. ×

export script step - filename in field?


This topic is 8129 days old. Please don't post here. Open a new topic instead.

Recommended Posts

How can I have the export script step pick up the contents of a field and use it as the filename of the exported file? It doesn't seem to be an option. I'd like users to have a "hands-off" approach to archiving data. (dates and extra info, maybe usernames, etc as exported names).

Link to comment
Share on other sites

Hi 'cdenby',

Assuming you're 'running on Windows' I have the following workaround.

In short:

- export your data to a fixed file-A

- export your desired batch commands into a fixed file-B.bat

- From within Filemaker run a BAT file that will call file-B.bat; so file-A is renamed or moved according to the specification in batch File-B and then erase file-B so no error messages will come up on the next export.

For executing a BAT file within Filemaker:

-Create a global container field

-Copy the BAT file (3rd file) in this field. This file should never change and have only 1 line like 'call c:tempexportfile2.bat'

-Create a script that does a Go to Field (select/perform, "your global field"), this should execute the BAT file. The automatically opened command window should close automatically after the BAT file has finished.

Please note that you can only do a 'go to field' script step when the field is on the current layout.

The container field does not have to have 'allow entry into field' enabled, but make sure to navigate away from the field in your script as the 'go to field' script step will take you there anyway.

If this is a hosted database please note that the Global field can only be really changed (for all users) when only 1 user has the file open. So open the file, stop sharing, change the content of the global container field and start sharing the file again.

Good luck,

Andries

Link to comment
Share on other sites

  • 4 months later...

This topic is 8129 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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