Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Ok, here is my problem, I'm hoping it's not impossible:

I have a bunch of TXT files, which have HTML code in them. Each file has the same layout and stucture, but with the Customer Name & Address and Product Name & Desciption being different on each page. I want to strip all the other info from all the text, and end up with only 2 fields, Customer Name & Address and Product Name & Description left. Is that possible?

Thanks guys, really appreciate the help!

Posted

Comment, thank you for the reply, if anyone can help me, you can! Here is the file in HTM format, or you can view it in notepad. I greatly appreciate any and all help.

example.htm

Posted

You haven't answered my question. I see two issues here: (1) how to import the file contents into a field; and (2) how to parse out the information you want.

The second issue may be tedious, but other than that it should be easy - assuming the code is the same for all. However, the first issue is not as easy: your file's extension is .htm and Filemaker doesn't see it as a "text file" when importing a folder. Unless you are willing to insert each file individually, you will need an OS-level script or a plugin.

Isn't there a way to get your data provider to switch to a more friendly format?

Posted

Bear with me, I'm no expert....

I know they are HTM, and I can't do anything but convert them all to TXT files. I can import all the records, and end up with a bunch of 1 field records with all the text in the field. Once I get them in there, I was hoping there would be an easy way to extract the actual data I need. I tried Find/Replace, to basically delete all the common text and end up with just the data I need, but I only got as far as trying to delete the " and I'm not sure how to say I actually want to delete the ", and that I'm not trying to use it in a function format.....

Posted

When I tried an open it it shows empty and says Invalid. When I try to open the zip file that is... Am I doing something wrong on my end? Thank you.

Posted

I'm using Windows 7, when I open it it's blank, and when I hit extract all it says "Windows cannot complete the extraction. The Compressed (zipped) Folder 'C:UsersJonathanDownloadsReceipts.zip' is invalid."

Anyway you can send me just the FM file LaRetta?

Posted

I am happy to try and the tester in me can't resist attempting to figure this out. So here is Receipts.zip which is my unzipped fp7 file zipped again (and the file opens fine). I have also attached ReceiptsORIG.zip which is my attaching Michael's original zip back (just to see if it is site related but I doubt it).

Oh, but no, I can't send it as fp7 ... limits of this site.

Receipts.zip

ReceiptsORIG.zip

Posted

Thanks LaRetta, I had a hunch that might have been the issue... I will have to check into it.

Posted

That's good. See if you can proceed with the attached.

Ok, so if I copy and paste the text into the field one by one it works great, but when I import all the records as a folder, the fields state ***not found***. I'm assuming I'm importing the records wrong? I'm not sure...

Posted

It means that the string defined as prefix in the calculation was not found in the imported text. Perhaps it's only a difference in the way carriage returns are encoded.

Posted

Ya because if I copy and paste the text from a file, and import the same file, it only works on the copied and pasted file. I'm going to see if I can remove all carriage returns from all the files using notepad++ and see if that resolves it...

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