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.

Function for a simple task?

Featured Replies

I'm embarrassed to post this but trust me, I've exhausted searching the internet for strategies.  Surely, with Filemaker Pro 12 there must be a way to create a function that looks to an existing text field and searches for a specific string?!?  'Products' would contain none or some or all of A  B  C  D  E , in a random order.  I would like to create a calculation that searches for 'B' and returns a text expression (there is no "contains" function).  I can't think it should be so difficult, I must be using the wrong terminology?  ('B' is just a representation of a longer name, ie. "cookies" or "twinkies" could be the products ...)

Thanks!

Lance

function that looks to an existing text field and searches for a specific string

 

Have a look at the PatternCount() function.

 

 

The bigger question here is why do you have a field that contains multiple values. That's not a good strategy.

Lance, is this a LIST (return delimited values)? if so, perhaps the list functions would help find a "match". You can return a "string" to a variable and/or field and/or dialog - however you make the match by script. Calculation could also return a string if there is a match. PatternCount() helps if you have unique enough values in the field (even multiples of the same phrases).

  • Author

Have a look at the PatternCount() function.

 

 

The bigger question here is why do you have a field that contains multiple values. That's not a good strategy.

You're absolutely correct.  This field is a result of another system export, so there's not much control over that.  In fact, my whole issue is to extract a specific product (in this case) and thus render the 'multi-variable field' non-critical:)

Thanks everyone, I'll give "PatternCount()" a try!

  • Author

PERFECT.  That works within my 'Case' argument perfectly:)

This field is a result of another system export, so there's not much control over that.  In fact, my whole issue is to extract a specific product (in this case) and thus render the 'multi-variable field' non-critical:)

Thanks everyone, I'll give "PatternCount()" a try!

 

Beverly is correct that (with return-separated values) it is better to test for:

not IsEmpty ( FilterValues ( "searchString" ; YourField ) )

This eliminates false positives such as when searching for "cat" in a field that contains "catalog". If your field is not return-separated, use the Substitute() function to replace the existing delimiter with ¶.

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.