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

Input Box

Can we use input box as a filter to get the required data in a table?? if yes, then how??

4 Replies
Not applicable
Author

I do this by using the input box to set a variable, and then using an expression in my chart that uses the variable. For example, to see accounts that have been inactive for "x" days, I have an input box that says "Enter number of inactive days", which then sets the variable "vDelayDays". In my chart, I use the expression "=if(LastActiveDay-today()>=vDelayDays,LastActiveDay)", where "LastActiveDay" is a field from my table. This sets the row to either show the Last Active Day value if the delay is over the specified limit, or null. You can then filter out the null rows.

Hope this helps

Not applicable
Author

Thanks kevin for the reply. It was helpful. But now the problem is if i do not put anything in the input box, then the table shown in the dcument is empty, which i do not want. i want that when i do not enter anything in the input box, then it should show the normal table.    

Not applicable
Author

hi Aneesh

Did you manage to solve the problem of not entering a value? i'm currently trying to do something similar to what you did.

Thanks

Not applicable
Author

Using my example from above, I'd initialize the variable to null in my script, i.e.

LET vDelayDays = Null()

Then, in my formula, I'd put in something like

if(IsNull(vDelayDays),.... (show the normal table), else (show the table with the vDelayDays variable plugged in)

If you want people to toggle back and forth between a value and the null value, you might need to put a button on the sheet with "Reset vDelaysDays to Null" next to your input box, as they won't be able to enter Null.