Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

mmarchese
New Contributor III

Get current sheet title?

I'm looking for a chart function like DocumentTitle()‌, but for the sheet title.  Even being able to get the sheet ID would be helpful.

7 Replies
atkinsow
Valued Contributor II

Re: Get current sheet title?

=GetActiveSheetId()

mmarchese
New Contributor III

Re: Get current sheet title?

It doesn't seem to work for me.  Is that a valid function in Qlik View but not in Qlik Sense?

atkinsow
Valued Contributor II

Re: Get current sheet title?

Possibly.  I'm in Qlkview.

erik_wetterberg
Honored Contributor

Re: Get current sheet title?

Hi

You are right, that wont work in Qlik Sense, engine doesn't know the current sheet. The API has method for getting the current sheet id : getCurrentSheetId

Hope this helps

Erik Wetterberg

Erik Wetterberg
https://extendingqlik.upper88.com/
mmarchese
New Contributor III

Re: Get current sheet title?

Cool, thanks.

In order to make use of that API function, I would have to make an extension, right?  I imagine it would do something like put the current sheet ID into a certain variable each time there was a sheet change.  It would be even better if I could make my own chart function that simply returned the current sheet ID.  Any thoughts?

Employee
Employee

Re: Get current sheet title?

How about this code for Extension?

var cur_sid = qlik.navigation.getCurrentSheetId();

qlik.currApp(this).getObjectProperties(cur_sid.sheetId).then(function(model){

  alert("current sheet title:" + model.properties.qMetaDef.title);

});

ksomosera10
Contributor

Re: Get current sheet title?

You could try this  code. Hope this will help.

qlik.navigation.getCurrentSheetId()

Community Browser