Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamically loading columns in QlikView straight after reloading data

Hi

I was wondering if there was any way to dynamically load columns on the front-end in a straight table after reloading.

I have a requirement where a new field is added in the script and I want to be able to dynamically load that field as either a listbox or a column in a straight table or pivot table.

Is there a way I can do this?

Thanks

2 Replies
Gysbert_Wassenaar

You can try using a macro. I don't think it's worth the bother. Fields should not magically appear and disappear from data models. A developer should consider the consequences of making data model changes, decide what to do, make the changes in the script and also make the necessary changes in the front end.


talk is cheap, supply exceeds demand
petter
Partner - Champion III
Partner - Champion III

This should give you an idea how you can make a Dynamic Straight Table by using variables that are created during load script run and later used in a straight table to put the right fields into dimensions and expressions. The straight table has to have the maximum number of dimensions and expressions predefined - I only added like 6 dimensions and 3 expressions but a final solution should probably have 10 dimensions and 10 expressions or something ...

2015-11-13 #3.PNG

I have used a trick to prefix the dimensions with dim_ and for the expressions I have added the aggregation function to the field name. Of course this approach have some limitations but it could be extended with more logic or that you specify what is dimensions and aggregations for the different expressions in a separate configuration file or something...

You can modify the CSV-file with more dimensions and expressions - but be aware of the limitation of 6 dimensions and 3 expressions that is in the attached version.

Note: The Input Box called Variables: can be deleted and is only for informational purposes... don't change variables directly in this...