Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 4343 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

 

 

 

 

Posted

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

Posted

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!

This topic is 4343 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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