Yes, it's possible. You can create a new listbox and set an expression with
To get all the fields you have loaded in your model.
And you can use
To get the name of the field selected, and use it later as part of an expression.
Anyway, I'd create variables in the script with the fields or formulas you want to use and let the user select among this variables.
To show conditionally a chart, go to the chart properties, Layout tab, and set there the conditional, something like
GetFieldSelections($Field) = 'Field1'
So the chart will be displayed only if Field1 is selected. Any valid expression in QlikView can be used in this conditional.
Hope that helps.
If you don't want all fields to be loaded, then use any kind of conditional to get only the field names you expect. Performance may be affected and it would be better to create new fields or variables in the script time to use them in expressions.
The text object with GetFieldSelections() will only show when some selection is done (one or more values).
Not knowing better what exactly are you using those functions, I can only say that it's working as expected in version 10 SR2 build 8935.7 using $Field in both listbox and multibox and a text object having only the function as above.
yea conditions seem to be inefficient, especially if you have a table with many fields...
i also found out searching through the community that i could hide/unhide objects too so i went to create an excel file with just one column and the fields i want from table1 as values under that column... then i went to load it and create a multibox to get the function of a dropdownlist... however, how do i get the value of the selected option?
Dear Axon SG,
I do not know if the attached can help.
GetFieldSelections.qvw 120.5 K
your example seems similar to what i have attempted, which is to create an excel file with the fields of the table as the values
then i loaded that new excel file and used the NewExcelColumn as a dropdownlist in a multibox...
i had to use a dropdownlist since i only want one selection to happen at 1 time since i only want 1 chart to appear at the same spot at 1 time...
when field1OfTable1 is selected, the chart related to field1OfTable1 will appear while the rest will be hidden and the same happens to the rest of the selections...
however, i have not tried using GetFieldSelections on the dropdownlist... am i supposed to do this, =GetFieldSelections(NewExcelColumn) = 'field1OfTable1'
unable to try it at the time of posting because i'm not at the workstation now...