SearchDataSource

Searches an indexed data source and returns results as a character-separated list of values (CSV).

Syntax

SearchDataSource( SearchTerm, DataSourceName, SuggestionVariableName, ResultCountVariableName, EncryptURLs, TermMinLength, MinResults, MaxResults, ListSeparator, RowSeparator );

Parameters

Parameter Name Type Description Optional? Default Value
SearchTerm String The text you want to locate in the indexed data. No n/a
DataSourceName String The indexed data source you want to search. No n/a
SuggestionVariableName String The keyword of a variable, which will store a suggested alternative will be assigned to this variable. if the SearchTerm provided does not match anything in the index. Yes ""
ResultCountVariableName String The keyword of a variable, which will store the number of results returned by the search. Yes ""
EncryptURLs Boolean Determines whether URLs in the function's search results will be encrypted. Yes 0/False
TermMinLength Integer Determines the minimum permitted length of the function's SearchTerm. Yes 3
MinResults Integer An integer representing a 1-based index within the function's search results set. The function will exclude any results whose index within the set is lower than this value. Yes 1
MaxResults Integer An integer representing a 1-based index within the function's search results set. The function will exclude any results whose index within the set is higher than this value. Yes 100
ListSeparator String The single character that separates values in the returned list. Yes ,
RowSeparator String The single character that separates rows in the returned list. Yes |

You can combine MinResult and MaxResult to return specific sub-sets of the search results. For example, setting MinResult to 6 and MaxResult to 10 will return the 6th through 10th results, and setting both arguments to the same integer will return the result at that index only. Setting MinResult to a value higher than MaxResult will return zero results.

Output

If successful, the function will return a CSV list of values matching the requirements outlined by the function. If the function fails for any reason, it will return an empty string.