rezdragon Posted September 1, 2006 Posted September 1, 2006 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?
bcooney Posted September 1, 2006 Posted September 1, 2006 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?
John Mark Osborne Posted September 1, 2006 Posted September 1, 2006 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
Fitch Posted September 5, 2006 Posted September 5, 2006 Yet another option is to use Troi File (or other similar FileMaker plugin).
rezdragon Posted September 29, 2006 Author Posted September 29, 2006 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.
bcooney Posted September 30, 2006 Posted September 30, 2006 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.
Fenton Posted September 30, 2006 Posted September 30, 2006 Are you putting "$FileName" in quotes? It should not have quotes.
rezdragon Posted October 3, 2006 Author Posted October 3, 2006 (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 October 4, 2006 by Guest
rezdragon Posted October 12, 2006 Author Posted October 12, 2006 hmmm the more i screw around with this the more confussed i get
bcooney Posted October 13, 2006 Posted October 13, 2006 I lost track of what you need here. Can you restate the goal again?
rezdragon Posted October 17, 2006 Author Posted October 17, 2006 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))
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now