Skip 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.

Filtering a calc field

Featured Replies

  • Newbies

I have a message forum that is driven by FM. I’d like to create a calculation to automatically cull posts and topics that contain certain words; sort of automatic censoring to make it easier to moderate the boards from flamers and people using profanity, etc.

So, if my source field is MessageBody and my result field is MessageBody_c how might be the most efficient way to have MessageBody_c be the result of MessageBody if no banned_words are in the MessageBody string or conversely if banned words are present then MessageBody_c would be null (empty or perhaps present a message indicating that the context is prohibited). The banned words would be stored in a global ‘banned_words’.

I’d like to create some kind of calculation to catch obvious abuse, I wouldn’t expect it to catch everything.

One concern I have is that I am sure there are limits to the number of words or characters that filemaker could efficiently index for comparison.

Suggestions how best to approach this problem? The forum is behind a login, so it’s not overly abused, but I’d like to put something in place to help manage the message content.

All ideas welcome.

First off isn't it really a database issue at all, since all normalisation

starts off getting one fact per field sorted, and here does a field containing several words that even might be repeated flunk this initial test.

However could a crafty combination of CF's (custom functions) fill a field with a boolean value or a replication of the record ID to get the record exempt from the association legitimate:

http://www.briandunning.com/cf/868

http://www.briandunning.com/cf/892

The method shown in action here:

http://www.filemakermagazine.com/videos/customlist-custom-function.html

But since we now have event triggers, might it be even faster to use regular expressions via calls to shell scripting:

http://www.zytrax.com/tech/web/regex.htm

However is there this plugin:

http://buzz.beezwax.net/2009/02/14/bbox-filemaker-plug-in-easily-add-applescript-shell-grep-and-more-to-your-filemaker-projects

....left out as as-is and free to use.

--sd

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.