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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
justin_morley
Creator
Creator

Can you pass current dimension name to a variable?

This problem is a bit tricky to explain so please bear with me

In my application I'm using many conditional dimensions which are conditional on largely the same set of rules, so I'm using the incredibly useful feature of being able to call a variable like a function, passing in a parameter, like so:

$(vGridConditional(param))

So in my definition of vGridConditional I'm able to pull out the value of param as a passed parameter within my variable: '$1'

This is an incredibly powerful and useful feature, which is working beautifully.

I'm wondering however is there any way to generically refer to the current dimension within my Enable Conditional statement?

Otherwise I will have to edit a whole bunch of conditional statements to hard code in the current dimension name, i.e.

$(vGridConditional(DimensionA))

...

$(vGridConditional(DimensionB))

... and so on

Is there any way of generically referring to the current dimension i.e.

$(vGridConditional(CurrentDimension))

Which will evaluate to the name of the current dimension within my variable definition?

Cheers,

Justin

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

No, unfortunately there's no possibility to reference the current dimension or expression. There's no this or self kind of operator.


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Not applicable

I couldn't understand 100%..

I think this may help you:

=GetCurrentField(GroupName)

Karthik

justin_morley
Creator
Creator
Author

Thanks for the reply Karthik. This doesn't help me I'm afraid.

The documentation states that the function GetCurrentField is used in conjunction with groups, which I'm not using.

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

No, unfortunately there's no possibility to reference the current dimension or expression. There's no this or self kind of operator.


talk is cheap, supply exceeds demand
justin_morley
Creator
Creator
Author

Thanks for your answer. It's nice to know where the hard limits of the product are.

I've now manually made the 200-odd edits to my grids this implies - something I wanted to avoid due to the possibility of human error creeping in somewhere!

Not applicable

getfield $fileld name