September 6, 201312 yr Is there any way to script the deleting of layouts and tables, or must it be done manually?
September 6, 201312 yr Author 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,
September 6, 201312 yr Solution 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.
September 6, 201312 yr 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.
September 6, 201312 yr Author 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?
September 7, 201312 yr 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.
September 7, 201312 yr Author 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.
September 7, 201312 yr 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?
September 7, 201312 yr Author 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.
September 7, 201312 yr 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.
Create an account or sign in to comment