Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

I am hoping to take a found set of images in container fields and generate the guts of a simple web page in a calculation field using repeating segments of code like the one below. I already have the filename isolated in a calculation field, and have posted another question in this forum about isolating the pixel dimensions too (though dimensions are not essential). The repeating code segment looks like this:

filename

filename

Contents of a description text field

The above should be relatively simple to generate with a calculation, but the difficulty for me is how to get it to loop through a found set and add each repetition into the one text field or text file so I can copy and paste it into an html template file. In other words, how to wind up with the following all in the one place:

pineapple.jpg

pineapple.jpg

A pineapple growing in a Fiji plantation

guava.jpg

guava.jpg

Guava fruit, rich in vitamin C

....etc....

Any help hugely appreciated.

  • Author

No responses so far, so maybe Filemaker is unable to concatenate data from several records into the one place. I'm surprised.

Maybe I can do it by sending a system event to a Windows command-line utility that will concatenate or splice text from a looping Filemaker script into a text file. It's got to be possible.

It's actually quite simple. You need a global text field to concatenate the result. The script would be something like this:

Go to Layout [ "YourLayout" (YourTable) ]

Show All Records

Sort Records [ Restore; No dialog ]

Go to Record/Request/Page [ First ]

#

Set Field [ Globals::gExport; <<< your preamble calc >>> ]

#

Loop

Set Field [ Globals::gExport; Globals::gExport & <<< your repeating calc >>> & ¶ ]

Go to Record/Request/Page [ Next; Exit after last ]

End Loop

#

Set Field [ Globals::gExport; Globals::gExport & <<< your postamble calc >>> ]

#

# Export Field Contents [ Globals::gExport; "file:../somefile.html" ]

#

Go to Layout [ original layout ]

---

Another option is to use XML export, with XML-to-HTML stylesheet. It's a bit more complex - see the XML example file in the documentation.

  • Author

Wow, fantastic. Thanks heaps for this -- it's going to save me hours of laborious work. I can't believe it's so easy. I'm working on implementing it now, and it looks good so far.

For the sake of anyone else reading in future, I've had to create a global field containing a double quote to get the formulas to work correctly with all the quotes required for html. So, one of my calc lines looks like this:

"& Globals::gQuote & Filename & Globals::gQuote & ¶ &</p></div></body></html>

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.