Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mike_garcia
Luminary Alumni
Luminary Alumni

Is this approach correct? Dynamic Variables

Hello Everyone,

We've been struggling with an unusual (at least for us) request from a customer: We need to make a projection of inventory shipping based on certain variables and the data that is already available.

So, we have SOME information, and we need to create a table with data for, let's say one month ahead. We have accomplished this with some scripting using for loops. The problem is, if a user changes one of the two variables used to calculate the projected data, the document needs to be reloaded, which as you know can not be done via web, not even with macros.

The approach I'm going for is to move that script part to a macro and, instead of creating a table per se, create a lot of different variables, one for each day for each shipment. Since we will not be using a large data set, I think performance will not be an issue.

My question is, how can I use an expression that determines which variable to use on each cell of the table. I was thinking to build the name of the variable dynamically based on the dimension values. For example, the expression would be =$(=Date&Shipment). Based on my testing, that does not work except when there is only one date and one shipment selected.

I'm asking for your ideas, anything you can think of to better approach this situation. Are macros the ideal solution? Is there a way to reload the document from web?

Any help is greatly appreciated. Have a good day.

Mike.

Miguel García
Qlik Expert, Author and Trainer
3 Replies
mike_garcia
Luminary Alumni
Luminary Alumni
Author

Ideas anyone?

Miguel García
Qlik Expert, Author and Trainer
Not applicable

Hi Mike, have you considered input fields already? They can be very handy in some cases.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Mike,

I'm not exactly clear on your scenario, but the idea of doing a similar (I think) lookup was discussed here:

http://community.qlik.com/forums/t/25496.aspx

You may find some ideas there.

-Rob