
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to get the Sheet ID
Hello,
I am looking to make a single Chart present different measures based on the Sheet it is located on. I found that DocumentName() provides the App portion of the URL, but I can't find a function that yields the Sheet. For instance, in the URL below, I want to return b1fd7972-dbfe-4c7a-97cf-b97b85bbbb17
/sense/app/ea22d26d-d927-4808-a3a5-81f259b02688/sheet/b1fd7972-dbfe-4c7a-97cf-b97b85bbbb17/state/edit
Any suggestions?
Thanks in advance for your help,
Chris
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To get the sheet ID from the URL, you can use the ObjectId('sheet') function. This function returns the ID of the sheet where the visualization is located. The sheet ID follows after '/sheet/' in the URL.
For example, if the URL is:
https://example.com/sense/app/guid/sheet/b1fd7972-dbfe-4c7a-97cf-b97b85bbbb17/state/analysis
Then the expression =ObjectId('sheet') will return 'b1fd7972-dbfe-4c7a-97cf-b97b85bbbb17', which is the sheet ID.
You can use this sheet ID in expressions to conditionally show or hide measures based on the current sheet. The ObjectId() function can be nested inside other expressions like if() or combined with functions like InObject() to create conditional logic.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Chris,
AFAIK, it's not possible without API call, and then a custom extension.
Nevermind, I though it was the title needed !
Kind regards

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To get the sheet ID from the URL, you can use the ObjectId('sheet') function. This function returns the ID of the sheet where the visualization is located. The sheet ID follows after '/sheet/' in the URL.
For example, if the URL is:
https://example.com/sense/app/guid/sheet/b1fd7972-dbfe-4c7a-97cf-b97b85bbbb17/state/analysis
Then the expression =ObjectId('sheet') will return 'b1fd7972-dbfe-4c7a-97cf-b97b85bbbb17', which is the sheet ID.
You can use this sheet ID in expressions to conditionally show or hide measures based on the current sheet. The ObjectId() function can be nested inside other expressions like if() or combined with functions like InObject() to create conditional logic.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your help! That was easier than expected. The Qlik documentation doesn't seem to show that this can be done.
.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Kudos nice solution!!
