Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
RichB
Contributor II
Contributor II

How do you get a populated response from GetActiveSheetID?

Hello

We are trying to build a function which will allow us to navigate away from a sheet and jump back to that sheet with the click of a button. It seems that when the buttton is clicked to navigate away from a sheet we want to set a variable with the current sheet id. When the button is clicked to return, the go to a sheet action reads the variable which is set with the previous sheet id and goes back.

I found a function available in the API Explorer:

https://[server]/dev-hub/engine-api-explorer (We are using enterprise) 

or

http://localhost:4848/dev-hub/engine-api-explorer ( Desktop )

After connecting to an app you can call the doc function "GetActiveSheetID".

We are planning to connect to this API through a web socket and create a server side extension using python, which will call this function through the API and return the id to our app.

However the response that I get is:

{
"jsonrpc": "2.0",
"id": 3,
"delta": true,
"result": {
"qId": "Document\\"
}
}

So it looks like I get no sheet ID even when I have the application open in another window.

Can anybody tell me how to get a response with a sheet ID? Also is there a way I can get the sheet name?

Labels (1)
1 Solution

Accepted Solutions
StefanStoichev
Partner - Contributor II
Partner - Contributor II

Haven't used this function myself but ...

this function should be "sessions specific". Which means that it will/should return different values depending on the current session. You can have multiple sessions (from the same user) to the same app and all sessions will return different results for GetActiveSheetID.

Even if you have the app open in another tab if you are creating new connection/session (in the current tab) then the function will return empty sheet id, since you haven't activated any sheet in the current session  

Regards!

Stefan

View solution in original post

1 Reply
StefanStoichev
Partner - Contributor II
Partner - Contributor II

Haven't used this function myself but ...

this function should be "sessions specific". Which means that it will/should return different values depending on the current session. You can have multiple sessions (from the same user) to the same app and all sessions will return different results for GetActiveSheetID.

Even if you have the app open in another tab if you are creating new connection/session (in the current tab) then the function will return empty sheet id, since you haven't activated any sheet in the current session  

Regards!

Stefan