searchAssociations method
This API is reliable and breaking changes are unlikely.
qlik.app.searchAssociations(qTerms, qPage, qOptions, callback)
Searches for one or more terms in the values of a Qlik Sense app.
Version history
Version state | Details |
---|---|
Introduced | 1.1 |
Deprecated |
2.2 Use instead: searchResults method |
Parameters
qTerms
Type: Array
Terms to search for.
qPage
Type: Object
Properties:
Name | Type | Description |
---|---|---|
qOffset | Number | Position from the top, starting from 0. |
qCount | Number | Number of search results to return. |
qMaxNbrFieldMatches | Number |
Maximum number of matching values to return per search result. |
qOptions
Type: Object
Optional.
Search options.
Properties:
Name | Type | Description |
---|---|---|
qSearchFields | Array | List of search fields. |
qContext | - |
Search context. Can be one of:
Default value is LockedFieldsOnly. |
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.
Example
app.searchAssociations(["se"],
{qOffset:0,qCount:15,qMaxNbrFieldMatches:5},
{qContext: 'CurrentSelections'},
function(reply){
var str = "";
reply.qResults.qFieldDictionaries.forEach(function(dic){
dic.qResult.forEach(function(result){
str += result.qText;
})
});
alert(str);
});