Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Fields.ToggleSelect not working with date range

Hello everyone,

I am getting a very weird problem. I have VBScript which will open Qlikview and select some fields based on some criteria then export it to Excel.

One of the field is a date field and it is select as below script.


dim start_of_week
dim current_date, day_of_week
current_date = date()
start_of_week = dateadd("d", -7, current_date) 'COUNT BACK 7 DAYS
objDocument.fields("S/O Action Date").toggleselect ">=" & start_of_week


It is used to work but suddenly this script is no longer working. It is unable to select the date range which is 7 days ago till now. It is selecting everything in "S/O Action Date" field. When I select this field with the same criteria, it is working but not in the script.

Does anyone have this problem before? Any hint to get it work.

Thanks,

Chris

1 Reply
m_woolf
Master II
Master II

Try ActiveDocument in place of ObjDocument