Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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?

Posted

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?

Posted

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

Posted

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

  • 4 weeks later...
Posted

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.

Posted

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.

Posted (edited)

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...
Posted

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...

This topic is 6592 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.