I am currently working on a project where I require the functionality to programmatically select data from a qlik object. I am doing this using the selectValues combined with the data from a field which works great for single items/strings, however, when I want to filter a list of dates, for example, I cannot get this to work.
Is there a way that I can use the selectValues method to query this data? I've tried building an array with the dates ['03/01/2018, 04/01/2018'] however this did not work.
Alternatively, I am open to suggestions on how I can save the state of currentSelectionItems, I have looked over the documentation but cannot seem to find anything suitable.
Solved! Go to Solution.
You could use selectValues and the numeric values for the dates. Or you could use search https://help.qlik.com/en-US/sense-developer/April2018/Subsystems/APIs/Content/BackendAPI/search-meth... and an expression using <= and >=. If you decide to use search you will also need to call acceotSearch https://help.qlik.com/en-US/sense-developer/April2018/Subsystems/APIs/Content/BackendAPI/acceptsearc....
Hey Erik thanks for your reply, it's much appreciated. I'm not at my computer at the moment but am I correct in thinking that I can use select values as so?
"29/01/2018"}], true, true);
I am using JS
Thanks, man that worked a treat. I had to write a JS function to convert the date from
"15/01/2018" format to the qlik / excel date format.
Gist to convert values here (requires moment and moment duration)