FORMULA LANGUAGE
Given two text lists, returns only those items from the second list that are found in the first list.
Syntax
@Keywords( textList1 ; textList2 ) or @Keywords( textList1 ; textList2 ; separator )
Parameters
textList1
When you do not specify a separator, the following word delimiters are used by default:
?. ,!;:[](){}"<> (question mark, period, space, comma, exclamation point, semicolon, colon, (brackets, parentheses, braces, quotation mark, and angle brackets)
A null separator, represented by an empty string (""), tells the function to use no delimiters.
resultTextList
Note With Release 6, the order of the words returned in resultTextList match the order of textList1. Prior to Release 6, the order of the words returned in resultTextList matched the order of textList2. To retain the pre-Release 6 ordering of the resutlTextList, prepend the formula with another @Keywords function as follows:
@Keywords(textList2;@Keywords(textList1;textList2))
When a keyword that you specify in textList2 is the very first word in the string you are searching AND you specify separators, @Keywords returns null. To prevent this behavior, prepend textList1 with one of the separators. For example, if you want to find the keyword, Sally, in a text list that contains employee names and positions, use the following formula:
@Keywords(" " + " ,Mary Halen, Director of Sales":" ,Sally Hall, VP of Marketing": " ,Joe Halzy, Order entry"; "Sally"; " ,")
This formula returns Sally. Note that one of the formula's separators, the space(" "), is prepended to textList1. This behavior does not occur if you accept the default separators or specify a null separator.
If one of the strings in textList2 contains any of the default delimiters, @Keywords will not return it. To search for Harvard University, for example, add a null separator to the formula. This tells @Keywords to search for any sequence of characters. If you do not specify a separator, you allow the default delimiters to act. @Keywords does not return Harvard University because when it parses textList1, it breaks the phrase into two separate words, Harvard and University, where it finds the space, which is a default delimiter.
When using the quotation mark separator ("), precede it with a backslash (\) to indicate that the quotation mark is a text constant.
This function is case-sensitive; you must standardize the case of textList1 and textList2 if you want case to be ignored (use @LowerCase, @ProperCase or @UpperCase).
Example See Also