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

So I'm trying to make a calculation field that will put records into certain groups if one of the fields contains a certain text. Is there an operator "contains" for text field calculations? For example,

case (position cn "Basketball", "Basketball", position cn "Ice Hockey, "Ice Hockey", "no sport")

Since the text could be at the front or middle of the field, I can't figure out how to make FMP recognize distinct text within a field. Thanks...

Bevin

Try this:

Case(PatternCount(cn; "Basketball"); "Basketball" ; PatternCount(cn; "Football"); "Football" ; ... ; "no sports)

Gerd

[ January 16, 2002: Message edited by: Gerd Muller ]

  • Author

Well, I played with what you gave me and came up with this:

Case(

(PatternCount(Position, "Basketball")=1) and (PatternCount(Position, "M")=1), "Men's Basketball", "no sport")

Thanks for the step in the right direction.

Bevin

Hi Bevin

You can skip the "=1" because all values greater than 0 are true. So you can write:

Case(

(PatternCount(Position, "Basketball")) and (PatternCount(Position, "M")), "Men's Basketball", "no sport")

nevertheless, you are getting in troubles, if you have sports like "Mountainbike" or "Badminton", where you have an "M" in the name already...

What are typical contents in your field "Position"? Wouldn't it be better to have a valuelist with sports where you can choose from?

Gerd

  • Author

I'm taking answers from a survey (which i didn't design and was answered in excel), where the field position could have a number of titles, such as assistant m basketball, 1st assistant m basketball, head m basketball, to refer to the coach of a team. I'm trying to do summary layouts of all basketball coaches, all football coaches, etc. I've done this by running consecutive searches for the words, printing, and then having the script go directly to the next search. This isn't the best way, of course, and I'm trying to add the field "sport" to group all coaches (with different titles) of the same sport together.

Hm.

Bevin

next time, i'll just design the initial survey ; )

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.