searchSuggest method
Information noteSTABLE.
This API is reliable and breaking changes are unlikely.
This API is reliable and breaking changes are unlikely.
qlik.app.searchSuggest(qTerms, qOptions, callback)
Returns suggestions of words from the values entered in the search. Acts as a helper for the searchResults method.
Version history
Version state | Details |
---|---|
Introduced | 1.1 |
Parameters
qTerms
Type: Array
Terms to search for.
qOptions
Type: Object
Optional.
Search options.
Properties:
Name | Type | Description |
---|---|---|
qSearchFields | Array | List of search fields. |
callback
Type: Function
Optional.
Callback method. Registers a callback that is executed every time data is returned.
Returns
A promise of a Qlik associative engine reply.
Tip noteFor more information regarding a promise, see The Promise API.
Example
app.searchSuggest(["se"], {}, function(reply) {
var str = "";
reply.qResult.qSuggestions.forEach(function(sugg){
str += sugg.qValue + ' ';
});
alert(str);
});