Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Difference between getobjectfield and getcurrentfield functions

Hi folks,

Can any one let me know the difference between getobjectfield() and getcurrentfield() functions with examples.

Many Thanks!

Surendra

6 Replies
Highlighted
MVP & Luminary
MVP & Luminary

getobjectfield(0) returns the name of the first dimension of the chart the expression is used in. getobjectfield(1) returns the name of the second dimension, etc.

getcurrentfield returns the currently active field in a cyclic or drill down group. Since groups are independant of charts, the getcurrentfield function can also be used in expressions that are not used in a chart, but for example a text box.


talk is cheap, supply exceeds demand
Highlighted
Not applicable

Thanks Gysbert. I've understood the use of getcurrentfield function completely. I understood from you that getobjectfield is used in charts only. Can you give an example for expression that works with getobjectfield and also let me know the scenarios in which getobjectfield is used.

Highlighted
Not applicable

This functions does not seem exist/to work in Qlik Sense? GetObjectField does not work and GetCurrentField does not exist. 

I am trying to get the active field in a drill down dimension to calculate an average reference line using the AGGR by the active field in the drill down dimension.

Highlighted
Contributor III
Contributor III

Is there a way to use GetObjectCode as a ListBox to show just the columns in a particular chart?  What I am trying to do is give the user a vertical list of the columns used in a table so they can see it at a quick glance and not have to always scroll through the table.

Highlighted
Creator III
Creator III

Highlighted
Master II
Master II

Here is an example regarding GetObjectField()  and hope this helps...

GetObjectField.jpg

Remember the index starts at 0 =GetObjectField(2,'CH02')

GetObjectField() will return the field name and not the contents. If you need the value in that particular column, Then use the below expression :

=concat(Distinct $(=GetObjectField(2,'CH02')),',')