searchSuggest method

Note: STABLE.
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

Introduced 1.1

Parameters

Name Type Description
qTerms Array

Terms to search for.

qOptions Object

Optional.

Search options.

Properties:

Name Type Description
qSearchFields Array List of search fields.
callback function

Optional.

Callback method.

Returns

A promise of a Qlik Associative Engine reply.

Tip: For more information regarding a promise, see https://code.angularjs.org/1.5.8/docs/api/ng/service/$q#the-promise-api.

Example

app.searchSuggest(["se"], {}, function(reply) {
	var str = "";
		reply.qResult.qSuggestions.forEach(function(sugg){
			str += sugg.qValue + ' ';
		});
		alert(str);
	});

Did this information help you?

Can you tell us why it did not help you and how we can improve it?