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.

Flag when field has any keywords in it

Featured Replies

Ok... I'm now at the frustrated point when I know that I *should* be able to do it, but I can't find the answers because I think that I'm google-fu-ing the wrong words.

 

I have a field that captures a Title, which consists of a variable amount of words.

 

What I want is a flag (or a "yes") when the Title field contains specific keywords. I know what the keywords are.

 

Ultimately, I want to apply the same thing to a description field using the same set of keywords.

 

I know I'm gonna kick myself when I figure it out, but any help would be appreciated.

 

 

 

 

Solved by LaRetta

Go to solution

PatternCount is the function you want to look at.. perhaps

  • Solution

Hi Sera,

 

I believe that, if you have a description with multiple words in the paragraph and you have a list of keywords then PatternCount() would not work for comparison unless you iterate through the keywords comparing each individually.  I might be wrong but I think you need recursion.

 

Attached is a simple custom function which should work for you.  For those with prior versions, it would be:

 

/*
LaRetta Kwandt
2013-2-28

Format
IsWithin ( string ; values ) 

Parameters
string -  any text string
values - a return-delimited list of text values

Data type returned
text

Description
Takes a field of text and compares to individual values  and counts how many words match.
*/

Let ( [
value = LeftWords ( string ; 1 ) ;
exists = not IsEmpty ( FilterValues ( values ; value ) ) 
] ;
exists + 
Case ( WordCount ( string ) ; IsWithin ( RightWords ( string ; WordCount ( string ) - 1 ) ; values )
) 
)

 

IsWithin.zip

  • Author

Oh frabjous!!!!

 

LaRetta, this is exactly what I needed. Thank you!!!

 

I am no longer frustrated. Woot!

 

Kris M, thank you for the assist. I can use PatternCount() for a different issue!

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.