EncodeSearchCode
Mon 01 January 2018Syntax
EncodeSearchCode(search_string)
Description
Use this function in special circumstances to encode a search string so that it is not âtokenizedâ by the search provider.
Note: Tokenization is the process that the search provider uses to split both indexed words as well as search terms containing special characters into multiple alphanumeric tokens. The index is generated using these tokens; therefore, at search time, the search provider also splits a similar search term into tokens to search the index. For special circumstances, PeopleSoft search definitions also allow that specific attributes can be encoded so that they are not tokenized during index generation. Similarly, to perform a search on attributes that have been marked for encoding on the Advanced Properties page, use this function to return an encoded search string to match the encoding done when the attribute was indexed..
This function converts all non-alphanumeric characters and the letters z and Z to hexadecimal values. A string that has been converted is terminated with Z. A string that does not include any special characters that require conversion remains unchanged as the return value. The following examples show the string input to and output from the EncodeSearchCode function.
-
Input:
abcz123456
Output:
abc7A123456Z
â The z was converted to hexadecimal 7A and the string was terminated with Z. -
Input:
abc123456
Output:
abc123456
â The search string was not encoded and therefore the string was not terminated with Z.
Parameters
Field or Control |
Definition |
---|---|
search_string |
Specifies the search string that is to be encoded. |
Returns
A String value.