Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello QlikView Gurus,
I am troubleshooting an existing application and have come across this scenario:-
The datamodel along with facts and dimension tables contains an Island table that has a single column: _Name.
This column has values: Sales,Flow,Asset
A list box is used in the dashboard to show the above values from this field (_Name)
There is a line chart that has two dimensions: Month and ='$(vCycDim)'.
Now based on the selection in the list box (or even a multibox having _Name field), the value for variable vCycDim gets updated.
E.g if list box has 'Sales' selected, the variable vCycDim gets the value 'Sales'. In the Variable Overview window I only see the string 'Sales' as the value for this variable. There is no expression.
I am aware of GetFieldSelections function but I am not able to find out how the variable value is assigned with a selection in listbox or multibox? There is no macro or Action(as in text box or button object) that is assigning the value. Not sure how the variable is picking the value?
I am sure this is a very common approach and hope my explanation is clear.
Any ideas?
Thanks
Nakul
Check the field triggers on the Triggers tab of the Document Properties window. It sounds like your variable is set by an action assigned to the OnSelect of one of the fields.
If your variable is defined with GetFieldSelections, then the function itself is telling the variable to use whatever is selected as a vCycDim. My guess is that the list box it is linked to has Always One Selected Value option selected to make sure that user are unable to select more than one value at a time.
Hi,
What's the definitions of the variable vCycDim?
Andy
Check the field triggers on the Triggers tab of the Document Properties window. It sounds like your variable is set by an action assigned to the OnSelect of one of the fields.
That's right, the list box has Always One Selected Value. In the variable overview window, since this variable always has a string value, I am not sure what function was originally defined. If I were to create a new variable, vCycDim1 (that stores the same set of values), what should the approach be?
You can use do it bunch of ways:
vCycDim1 = GetFieldSelections(ListBoxField) or
vCycDim1 = Concat(DISTINCT ListBoxField) or
vCycDim1 = Only(ListBoxField)
I think all of the above should work.
Best,
Sunny
It just shows up with a string value (eg: Sales)
Yes! I found a FieldEvent Trigger for this field that 'OnSelect' assigns the value to the variable. I did check the triggers tab before but must have missed it! Thanks Gysbert.