selectValues method
app.field.selectValues(array, toggle, softlock)
Method used to select specific values in a field.
- Since:
-
- 1.0
Parameters
Name | Type | Description |
---|---|---|
array | Array |
Array of qFieldValues to select. Since Qlik Sense version 1.1, a simplified syntax with strings or numbers also works. Information noteFor a numeric field you need to provide the numeric value.
|
toggle | Boolean |
Optional. If true, toggle selected state. |
softlock | Boolean |
Optional. If true, locked selections can be overridden. |
Returns
A promise.
Tip noteFor more information regarding a promise, see http://docs.angularjs.org/api/ng.$q.
Example
Example: Array of qFieldValues to select
var app = qlik.openApp('c31e2aba-3b46-4b13-8b87-c5c2514dea1d');
app.field('LastName').selectValues([{qText: "Andersson"},{qText:"Bush"},{qText:"Obama"}], true, true);
Example: Simplified syntax with strings and numbers
var app = qlik.openApp('c31e2aba-3b46-4b13-8b87-c5c2514dea1d');
app.field(fld).selectValues([5], true, true);
app.field(fld).selectValues(["Andersson"], true, true);
Did this page help you?
If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!