Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I Have a cyclic group as below:
Group Name : abc
Fields Label
a w
b x
c y
d z
In a textbox, I am using =GetCurrentField(abc) to get the current field of the cyclic group.
But my Requirement is to get the label and not the fieldname.
Is that possible??
Regards,
Anjali Gupta
I guess, there is no direct way to get the label name. Instead, you can use below expression,
=Pick(Match(GetCurrentField(abc) ,'a','b','c','d'),'w','x','y','z')
Hi,
Yes it is possible.
You can use the same expression in label.
Regards,
Kaushik Solanki
Hi Chanty,
Thanks for the quick reply. But in the above link. They have changed from cyclic group to drop-down list.
But what I need is cyclic group and not drop-down list.
see this https://community.qlik.com/message/17673#17673
Vikas
Hi Kaushik,
I didn't get you. Where do you want me to write the expression?
If you can tell me what exactly I have to do then it would be great.
Thanks,
Anjali Gupta
did u try this?
you can use =getCurrentField(groupName) to get the current selection in the cyclic group.
For the second, if you select the option "show title in chart" and leave the title blank, it will use the expression label for the expression selected (assuming that this is the first expression).
Hi Chanty,
If you have read my question, I have mentioned that I have tried that expression. But it is giving me the field Name and not the label associated with that field.
But my requirement is to use the label and not the field name.
Regards,
Anjali Gupta
can u share the sample ?
The only solution is to put the label within each group-dimension and extract it from there again. This meant if you used:
Fields Label
a w
b x
c y
d z
you changed the included fields into expressions and put your label as comment:
Fields
= a //w
= b //x
...
and the you extract it with:
subfield(getcurrentfield(abc), '//', 2)
- Marcus