Returns all unique words from theText. They are listed in order of appearance and separated by a return.
TrText_UniqueWords ( switches ; theText )
|switches||(optional) determine the way the result is returned|
|theText||the text for which the unique words have to be found|
Switches can be empty or:
|-ReturnAtEnd||add a return character at the end|
|-Unused||use this to make clear switches are not used, you can also use ""|
Data type returned
All unique words from theText, listed in order of appearance and separated by a return.
Troi Text Plug-in 1.2
FileMaker Pro 16 to 19
This function returns the words in the case in which they appear in the text field. Words that appear both in uppercase and lowercase letters are considered to be different words and both will be returned in the list.
Set Field [ result ; TrText_UniqueWords ( "-unused" ; theText ) ]
Say text field “theText” consists of the following lines:
This is a line
this is another line
Then the result will be:
If you want a sorted list of all words in a field you can use this calculation:
sortedWords = TrText_SortLines ( TrText_UniqueWords ( "-Unused" ; theText ) )