Can any one let me know the difference between getobjectfield() and getcurrentfield() functions with examples.
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.
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.
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.
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.
Here is an example regarding GetObjectField() and hope this helps...
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 :