English Qlik Sense Developers 2.2

Navigation API

qlik.navigation

Navigation API for Qlik Sense. The Navigation API allows you to navigate within a Qlik Sense app, and is meant to be used in visualization extensions and will not work in Mashup scenarios.

Since:
  • 2.1

Properties

Name-space Parameters Returns Description
qlik.navigation.nextSheet - navigationResult object (including sheetId)

Jumps to the next sheet in the current app. It will do nothing if you do not have sheets in the current context.

The method will return before the actual navigation takes place.

Example:  

qlik.navigation.nextSheet();
qlik.navigation.prevSheet - navigationResult object (including sheetId)

Jumps to the previous sheet in the current app. It will do nothing if you do not have sheets in the current context.

The method will return before the actual navigation takes place.

Example:  

qlik.navigation.prevSheet();
qlik.navigation.gotoSheet sheetId navigationResult object (including sheetId)

Jumps to a given sheet in the current app. The method will return before the actual navigation takes place.

Example:  

qlik.navigation.gotoSheet('xYgfJ');
qlik.navigation.getCurrentSheetId - navigationResult object (including sheetId)

Gets the current sheet ID.

Example:  

var result = qlik.navigation.getCurrentSheetId();
	alert('sheet id':+result.sheetId);
qlik.navigation.gotoStory storyId navigationResult object (including storyId)

Opens the given story within the Qlik Sense client.

The method will return before the actual navigation takes place.

Example:  

qlik.navigation.gotoStory('xYgfJ');
qlik.navigation.switchMode mode Returns the mode switched to

Switches the mode. The following modes are possible:

“EDIT” or “ANALYSIS”

qlik.navigation.isModeAllowed {string} Either “EDIT” or “ANALYSIS” {boolean}

Checks if a given mode is allowed.

Example:  

if(qlik.navigation.isModeAllowed(qlik.navigation.EDIT)){
	//enable edit button
};

qlik.navigation.setMode

{string} Either “EDIT” or “ANALYSIS” navigationResult object Sets the current mode.

qlik.navigation.getMode

- Returns the current mode

Gets the current mode.

Example:  

var result = qlik.navigation.getMode();
	alert('mode':+result);

Navigation result object

{
"success": true|false,
"error": "NOCURRENTSHEET",
"errorMsg": "No current sheet"
"sheetId": "xxxxx",
"storyId": "xxxx"
}			

Possible errors

  • NOSUCHSHEET
  • NOCURRENTSHEET
  • NOSUCHSTORY