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 7317 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Just found this forum - what a great place!

I wonder if anyone can help? Excuse me if this is a really simple question - I'm relatively new to FileMaker.

I'm building a website and for part of this I need to create about 150 simple pages, each one listing a different business. I'ts a one off job that doesn't need a 'live' database online or anything complicated like that.

I'll receive the database in a spreadsheet format and have no problems getting this into FileMaker.

To makemy life a little simpler I thought that I could simply add some need fields to the database, so that I can add little bits of HTML code before and after each field, i.e.

<h1>

Business name field

<h2>

I can then export this as a text file and just copy and paste the entries into a simple HTML template.

I've had no problem adding the new fields and have tested the exporting idea.

The problem is getting the auto-filled data into the existing records?

In my initial tests it seems that once I've created the auto-filling fields, it adds the data for newly created records - but not for the existing 150 records I've imported.

Am I missing something really simple?

Many thanks!

Simon

Posted

Hello Simon,

Welcome to the Forums!

Forgive me if I didn't understand your question but I think your asking how to mass replace the contents of a specific field across an entire found set. If this is the question try this:

Do a find to get all of the records that you want to change.

Put your cursor in the field that you want to populate.

Pull down: Records -> Replace Field Contents

From there you will see the option to replace with literal, or serial number, or a calculation. If you are adding html tags to the contents of the field you should explore the calculation option. Be aware that you can call out the field itself in the calculation. Also be aware that there is no undo so you will probably want to practice on something else first so you don't mess up your production data.

Good luck,

  • Newbies
Posted

Hi Ted,

Thanks for your reply - that's really useful.

The only other thing I'm now wondering is if there's a way to get FileMaker to add HTML tags (as described above) but then export each record as a separate text file?

Many thanks,

Simon

Posted

When you export, you export the current found set of records. I don't quite get why you need separate files if you're going to copy and paste the snippets, but anyway the answer is that exporting with FileMaker alone won't work very well, since each export will overwrite the previous one unless you manually name each exported file. Your options are either to use a plugin such as Troi File, or use AppleScript. If you go the latter route, I would think you'd not even use export, but rather invoke AS to create the file and set its contents. FileMaker would simply loop through each record and call the AS.

Posted

You can export each record as a separate file, if it is the only member of the found set. This is little tricky. This would do all records.

Show All Records

Go To Record/Request [First]

Omit Record

Show Omitted Only

Export

* Rename with Perform AppleScript step

Loop

Posted

What I was trying to convey is that, if you're going to go to the trouble of exporting and renaming all these files, why not just use AS to do the whole thing. So the script would just look like:

Loop

* Create file and set name/contents with Perform AppleScript step

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