February 22, 200818 yr Hello all, I wonder if someone can help me with this. I have field1 that has text like "The shiny red car went fast" I have three other fields that each have a word like: 'shiny' 'car' 'fast' Since those 3 fields match words in field1, I would like to do a calculation that assigns points based on the amount of keywords in field1. In this case each of the 3 words is worth 10 points so my calculation field would equal 30 points. What I'm not sure how to do is to match the keywords with the line of test. Hopefully I explained this right and thanks in advance for the help. William
February 22, 200818 yr Maybe something like... gKeyword1 = global field gKeyword2 = global field gKeyword3 = global field gPoints = global number field Let ( m = " " & gTextField & " "; gPoints * ( PatternCount ( m ; " " & gKeyword1 & " " ) + PatternCount ( m ; " " & gKeyword2 & " " ) + PatternCount ( m ; " " & gKeyword3 & " " ) ) )
Create an account or sign in to comment