Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to use input field to update a direct query

Hi all,

I am currently trying to create a dashboard with a line chart, an input field and a reload button.

I want to be able to use direct query to load different time series. (The problem is, I have the possibility of loading >1000 time series (seconds data) and I don't want to load all data in loading script which would take ages, so  I use direct query.)

The dashboard looks like this:

dqdashboard.PNG

I load the timestamp as a dimension and the input variable as measure (has default value temperature). This works only for the default variable name. If I input another variable name, the data does not change.

My loading script:

let DQVarName = 'Temperature';

DIRECT QUERY
Dimension
t_stamp
Measure
$(DQVarName) as value
FROM MY_TAG_TABLE;

I would like to be able to load another time series, by typing the name of another measure in the input field.

Can you help me with that or is there maybe a better way to do it?

Thanks a lot!

1 Reply
YoussefBelloum
Champion
Champion

Hi,

maybe try the solution provided here

Pass variable from user to script? | Qlik Community

it is an old thread and maybe swuehl‌ have a better solution for this now ?