Skip to main content Skip to complementary content

selectValues method

Information noteSTABLE.

This API is reliable and breaking changes are unlikely.

qlik.app.field.selectValues(array, toggle, softlock)

Selects specific values in a field.

Version history

Version history
Version state Details
Introduced 1.0
Updated 1.1

Parameters

array

Type: Array

Array of qFieldValues to select.

A simplified syntax with strings or numbers also works since version 1.1.

Information noteFor a numeric field you need to provide the numeric value.

toggle

Type: Boolean

Optional.

If true, toggle selected state.

softlock

Type: Boolean

Optional.

If true, locked selections can be overridden.

Returns

A promise.

Tip noteFor more information regarding a promise, see The Promise API.

Example

Example: Array of qFieldValues to select

var app = qlik.openApp('c31e2aba-3b46-4b13-8b87-c5c2514dea1d', config);
	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', config);
	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!