Jump to content

Extract all values with 4 words or more from List of Values


Recommended Posts

Hi all, I hit my logical thinking-limit and FileMaker knowledge with the following, seemingly simple problem: I would like to filter a list of values to only show values with four or more words. How can I do that?

Sample Input:

Test

Test Requirement

Test Requirement Example

Test Requirement Example for

Test Requirement Example for HBS

Test Requirement Example for HBS 5.0

Expected Output:

Test Requirement Example for

Test Requirement Example for HBS

Test Requirement Example for HBS 5.0

 

 

Many thanks in advance!

Link to post
Share on other sites
1 hour ago, innodat said:

seemingly simple problem:

I don't think it's that simple. You need to loop over the values and examine each one in turn. Try:

While ( [ 
i = 1 ;
result = ""
] ; 
i ≤ ValueCount ( Input ) ; 
[ 
line = GetValue ( Input ; i ) ;
result = If ( WordCount ( line ) ≥ 4 ; List ( result ; line ) ; result ) ;
i = i + 1
] ; 
result 
)

 

 

Link to post
Share on other sites

What would the FileMaker community do without you?? Seriously. This is amazing. Copy-pasted - works. And I learned something today. 

THANK YOU!!!!!!

Great example for using the new "while" function too.

Link to post
Share on other sites

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.