Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Does any know what the below expression isn't working.
=GetFieldSelections(SubField(mid(GetCurrentSelections('|'),Index(GetCurrentSelections('|'),'|',-1)+1),':',1))
It seems the GetFieldSelections does not recognize the resulting string from SubField(mid(GetCurrentSelections('|'),Index(GetCurrentSelections('|'),'|',-1)+1),':',1) as a valid field name.
I tried appending '[' ']' or Chr(39) but no luck so far.
Thanks in advance
May be give this a shot
=GetFieldSelections($(='[' & SubField(mid(GetCurrentSelections('|'), Index(GetCurrentSelections('|'), '|', -1) + 1),':',1) & ']'))
May be try this
=GetFieldSelections($(=SubField(mid(GetCurrentSelections('|'), Index(GetCurrentSelections('|'), '|', -1) + 1),':',1)))
Hi Stalwar1,
I got an invalid dimension error when I tried it
Hi,
1. Create variable:
vGetFielsSelections : =chr(91)&SubField(mid(GetCurrentSelections('|'),Index(GetCurrentSelections('|'),'|',-1)+1),':',1)&chr(93)
2. Call that variable,
=GetFieldSelections($(vGetFielsSelections))
May be give this a shot
=GetFieldSelections($(='[' & SubField(mid(GetCurrentSelections('|'), Index(GetCurrentSelections('|'), '|', -1) + 1),':',1) & ']'))
Stalwar, Thank you very much. It worked. Can I trouble you to explain the modifications to my expression in particular why I needed to include $(...)
Thanks I found a solution. But I will also try yours as well when I get the chance.
The inner expression, i.e.
SubField(mid(GetCurrentSelections('|'),Index(GetCurrentSelections('|'),'|',-1)+1),':',1)
Was giving a field name, but it was not read by GetFieldSelections as a field, but just a text. Using the dollar sign expansion, we told QlikView/Qlik Sense to interpret it as a field rather than just a random text. And the reason we needed [] is because you might have a field which had spaces... and QlikView/ Qlik Sense needs [] brackets for fields with spaces.
HTH
Best,
Sunny