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.

Dynamic naming of an export

Featured Replies

Hey just a question,

im going to be working with a bunch of export to .txt files. and each week depending on the issue number the file will change from say

44010.txt to 45010.txt

Now here is the question. Is there a way for me to specify the change of that first 2 numbers according to what week i am on?

The quick answer is "yes."

Use the WeekofYear() date function. It returns the input date's week of the year. So, a calc field, numeric result, WeekNum=WeekofYear(get(currentdate)) would return today's week of the year.

Then in your export script, set a variable, $ExportFileName to: WeekNum & "010.txt"

However, because you've built in the get(currentdate), you must run the script on the correct week (most likely Friday). So, you may wish to have a global field, gExportDate, and use that to build your file name. Then you can have the Export routine ask for gExportDate, and run last week's export on Monday with no problems.

Perhaps this is tied to a Find, also?

The excellent technique described by bcooney requires FileMaker Pro 8 or later. It looks like you only have FileMaker 7. Maybe you can get an upgrade.

BTW, I also have a file on my web site which demonstrates this technique:

http://www.filemakerpros.com/SAVEDYN.zip

See here.

Yet another option is to use Troi File (or other similar FileMaker plugin).

  • 4 weeks later...
  • Author

ok here is the problem,now

I tryed the example of what you guys stated and well i get an error that there is not enough room ? and i can't seem to figure out why

the error is "$FileName" could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk.

this is the standard msg you get when the export doesn't work.

Most likely it's a problem with the path. Look carefully at the example paths in the FM Help. Try hard coding one. Watch for extra ""s.

Are you putting "$FileName" in quotes? It should not have quotes.

  • Author

GGGGGGGGGGGGreat sudgestion to check my output now it actually works,,, i beleave the words i should be looking for are DUH what an A_ _ i am .... lol

--------------------------------------------------------

Ok, so that is all well and good, yet what i really am looking for is a way to not specify the export in a box but to specify it by saying something like this

2418 - 24 being the edition 18 being the county the book is published in and being able to specyfy that as the file name but at the same time there being things like 2419, 2420, 2421, and having them all export out to different files at the same time, according to the last 2 digits

Edited by Guest

  • 2 weeks later...
  • Author

hmmm the more i screw around with this the more confussed i get

I lost track of what you need here. Can you restate the goal again?

  • Author

ok here is my plan,

im working on a classifieds database for something similar to a newspaper

each week new classifieds get entered into the database and they have the option of puttin the classified into multiple counties. basically i need it to when i click export to the txt files. i need it to go in. get the files specified for each county, get the txt for those files. and export them to a single tab delimited txt file that will name its self according to a issue number as in 1534, ( 15 being the issue number and 34 being the code for the county )((their are 80 possible counties , and obviously 52 possible issue numbers))

  • 4 weeks later...
  • Author

i feel so lost,,, ugh

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.