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.

Find & Return Words in Field

Featured Replies

Hey Guys,

I'm basically looking to extract information from a field. So lets say I have a field called "Tags" and for arguments sake, let's say the field contains color string inside, IE "Red Blue Black Green Purple Orange"

Now if I wanted to check if the field contained the word "Green" within the string and if it DOES  contain it, then to RETURN that result and set it into a field somewhere? So the result of the calculation would be "Green"

 

I'm sorry if thats unclear, but I need to find a way to do this, to check for and extract a certain word from the "Tags" field which is a long string of text (different words)


Thanks in advance

1 hour ago, hutchlad said:

check if the field contained the word "Green"

The problem with this requirement is the word "word". It is very easy to check if the field contains the string "Green", using either the PattternCount() or the Position() function. The problem is this could easily return a false positive answer if the field contains another word that contains the given string - e.g. "Evergreen" or "Greenfield".

If this is a "Tags" field, I would suggest you change it to use a return-separated list of values. That is a data type that Filemaker recognizes and provides tools to work with. You can easily test for the presence of an item in such field by doing = 

FilterValues ( "Green" ; Tags )

The result will be "Green" when Tags contain the value "Green" , empty otherwise.  The search is not not case-sensitive, but items like "Greens" or "Greeny" will not be considered a match.

 

 

Edited by comment

Comment, a request for clarification. Perhaps I missed something.

I understand how "Greens" will not be a match, when using the return-separated list, filterValues approach.

But it seems to me that "Green" would match "Green"

This auto-correct feature can be pesky at times. 

I was under the impression that the OP wanted a list of the words that were colored "Green", 'Red" etc.?

Just now, Lee Smith said:

I was under the impression that the OP wanted a list of the words that were colored "Green", 'Red" etc.?

I hope not!

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.