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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
mmarchese
Creator II
Creator II

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
Anonymous
Not applicable

=GetActiveSheetId()

mmarchese
Creator II
Creator II
Author

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

Anonymous
Not applicable

Possibly.  I'm in Qlkview.

ErikWetterberg

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

mmarchese
Creator II
Creator II
Author

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?

tts
Employee
Employee

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
Creator II
Creator II

You could try this  code. Hope this will help.

qlik.navigation.getCurrentSheetId()