JHaughey Posted September 6, 2013 Posted September 6, 2013 Is there any way to script the deleting of layouts and tables, or must it be done manually?
JHaughey Posted September 6, 2013 Author Posted September 6, 2013 Thanks, Lee. Not sure if that's exactly the question, though. I'll explain. I have a timed script that looks at folder on the network every 10 minutes. When it finds that there are files there, it imports each file into a new table, does some processing, and spits out another file in another place. So, as the last stage of this process, I can obviously go through with a "cleanup" script that deletes all the no longer needed records, but I will still have all the new tables, TOs, and layouts accumulating. Is there anyway to dispose of them by script? Maybe it doesn't matter much since there aren't any actual records? Thanks,
bcooney Posted September 6, 2013 Posted September 6, 2013 Why are you creating a new TABLE for each import? Why not new records in a temp table. And, no, you cannot script the deletion of tables or layouts.
Lee Smith Posted September 6, 2013 Posted September 6, 2013 Well, that's a lot better information on what you're doing then your first post. Listen to Barbara to knows what she's talking about.
JHaughey Posted September 6, 2013 Author Posted September 6, 2013 Thanks, Barbara. The reason I'm creating new tables is that I don't know ahead of time how many fields each .csv file will have. They could have anywhere from just a few up to a few hundred. If I create a new table for each, then the number of fields is tailored to the number of fields in the file. I guess that's not actually all that important, though. What would you suggest? Creating one temp table with enough fields to accommodate the files with the largest possible number of fields?
bruceR Posted September 7, 2013 Posted September 7, 2013 Why create any tables, ever? What's the big picture here, what kind of data are you handling? You don't seem to be mapping the new data to any existing FileMaker data structure.
JHaughey Posted September 7, 2013 Author Posted September 7, 2013 Hello Bruce, You're correct. This is a separate and discrete process from our FileMaker solution. So, yes, it might have been better done with some kind of .Net filestream programming. My C-sharp is rusty and choppy enough that I thought it would be quicker and easier to just whip something up in FileMaker. In fairness, the Filemaker process was pretty easy to put together, and it works well enough, it's just that I'm left with some debris when it's done.
bruceR Posted September 7, 2013 Posted September 7, 2013 Well, that isn't very descriptive, and your answer certainly doesn't follow. What is the process? What are you doing? What is the end result?
JHaughey Posted September 7, 2013 Author Posted September 7, 2013 I am taking .csv variable data files created by data processors, determining which fields are populated and which are not. Then sending the first 10 records of just the populated fields in a readable fieldname:value format to a printer. Secondly, the same data is written to a Word file as a backup in case there is a printer issue, or the hard copy is lost/damaged, etc.
bruceR Posted September 7, 2013 Posted September 7, 2013 I think there are ways to do that which take advantage of the flexibility and scriptability of FileMaker but do not require you to continuously create new tables and layouts. For instance you can use the import folder method to import entire text files into a text field and parse it. You can also use the insert from URL command to insert text contents of a file for parsing. More options if you're willing to adopt plugins.
Recommended Posts
This topic is 4097 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