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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
bean
Partner - Contributor III
Partner - Contributor III

Get the SheetID by name

Hi there,

We want to hyperlink to another sheet. Since SheetIDs change from app instance to instance, I'm looking for a function to retrieve a particular sheet's ID in an expression or during load (and put result in a variable).

The URL to an sheet looks like

https://<Server name>/sense/app/<App ID>/sheet/<Sheet ID>/state/analysis

and using an expression I can resolve most parts dynamically. But not yet the sheet ID being here YMSKeu

='https://' & GetSysAttr('tenantUrlAlias') & '/sense/app/' & DocumentName() & '/sheet/YMSKeu/state/analysis'

Any idea how to find the right sheet ID e.g. from it's name? ObjectId() or GetActiveSheetId() do not help since I'm looking for another sheet than the function is running in.


Thanx so much

 

2 Replies
Or
MVP
MVP

You should be able to use the Qlik API to get the list of sheets from the app:

GET https://<YourServer>/qrs/app/object?filter=app.id eq <AppID> and objectType eq 'sheet'

see e.g. https://community.qlik.com/t5/Integration-Extension-APIs/QlikSense-RestAPI-Get-Sheet-Info-for-App/td...

 

DocumentName() will get you the ID of the current app to pass along to the API, though note that using this in script will use the ID of the app where it was last reloaded so it is important that the reload happens on the published app rather than a manual reload in someone's work and then publish. 

 

Chanty4u
MVP
MVP

May be try this 

GetActiveSheetId()

ObjectId()

SheetTitle()