Skip to main content

Field API

Information noteIf you are using Qlik Sense Business or Qlik Sense Enterprise SaaS, see the API documentation at the Qlik (Developer Portal).
Information noteSTABLE.

This API is reliable and breaking changes are unlikely.

qlik.app.field

The qlik.app.field method is the entry point to the Field API. It returns a QField object with methods and properties that can be used to manipulate the field.

field method

Version history

Each method and property contain information around when it was introduced, updated, deprecated or removed. A list of all relevant API changes per version release can be found in API version history.

Version history
Version state Details
Introduced 1.0

Getting started

You must first connect to the Qlik Sense app, and you do this with the qlik.openApp method. You then use the qlik.app.field method to get a field reference with methods that can be used to manipulate the field.

and QSEoK }; require(["js/qlik"], function(qlik) { // open the app var app = qlik.openApp('c31e2aba-3b46-4b13-8b87-c5c2514dea1d', config); //get a field reference and clear the field selection var lastNameField = app.field('LastName'); lastNameField.clear(); });
var config = {
	host: 'QSE_domain',
	prefix: '/',
	port: 443,
	isSecure: true,
	webIntegrationId: 'web-integration-id-here' //only needed for SaaS editions

Examples of use

Learn what you can do with the Field API.

Select values in a field

Use the app.field.selectValues method to select specific values in a field.

Example 1: Using standard syntax

and QSEoK }; require(["js/qlik"], function(qlik) { // open the app var app = qlik.openApp('c31e2aba-3b46-4b13-8b87-c5c2514dea1d', config); // select values - standard syntax app.field('LastName').selectValues([{qText: "Jones"},{qText: "Bush"},{qText: "Obama"}], true, true); });
var config = {
	host: 'QSE_domain',
	prefix: '/',
	port: 443,
	isSecure: true,
	webIntegrationId: 'web-integration-id-here' //only needed for SaaS editions

Example 2: Using simplified syntax

and QSEoK }; require(["js/qlik"], function(qlik) { // open the app var app = qlik.openApp('c31e2aba-3b46-4b13-8b87-c5c2514dea1d', config); //select values - simplified syntax app.field('LastName').selectValues(["Jones"], true, true); });
var config = {
	host: 'QSE_domain',
	prefix: '/',
	port: 443,
	isSecure: true,
	webIntegrationId: 'web-integration-id-here' //only needed for SaaS editions

Clear field selections

Use the app.field.clear method to clear a field selection.

and QSEoK }; require(["js/qlik"], function(qlik) { // open the app var app = qlik.openApp('c31e2aba-3b46-4b13-8b87-c5c2514dea1d', config); //get a field reference and clear the field selection var lastNameField = app.field('LastName'); lastNameField.clear(); });
var config = {
	host: 'QSE_domain',
	prefix: '/',
	port: 443,
	isSecure: true,
	webIntegrationId: 'web-integration-id-here' //only needed for SaaS editions

The app.field.clearOther method clears all fields except the selected one.

and QSEoK }; require(["js/qlik"], function(qlik) { // open the app var app = qlik.openApp('c31e2aba-3b46-4b13-8b87-c5c2514dea1d', config); //clears all fields except the selected one app.field('LastName').clearOther(true); });
var config = {
	host: 'QSE_domain',
	prefix: '/',
	port: 443,
	isSecure: true,
	webIntegrationId: 'web-integration-id-here' //only needed for SaaS editions