Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Clear variable when Field is cleared

Hi,

I have followed this guide: http://www.learnqlickview.com/dynamic-calendar-widget-in-qlikview/

and have a document setup like above.

When I clear my "Date" field, I would like to also clear the dateFrom and dateTo variables, but how can I achieve this?

Otherwise, when you clear the date field- the calendar object still has the old dates- which can easily fool a user.

James.

15 Replies
Not applicable
Author

Please see my attached document, could you see how I would implement your solution? I can't seem to get yours working in my environment.

SergeyMak
Partner Ambassador
Partner Ambassador

PFA

In my opinion it works

Regards,
Sergey
Not applicable
Author

Thanks Sergey,

it's now working my example document- must be something weird going on in my actual document because it still isn't working there.

you've answered the problem though so have marked you as correct.

James.

SergeyMak
Partner Ambassador
Partner Ambassador

You can share your original application.

But probably you need to reduce (File\Reduce Data) and Scramble data (Settings\Document Properties\Scrambling - select some fields and click Scramble)

Regards,
Sergey
Not applicable
Author

Ok Sergey, let's see you solve this one.

Why the hell isn't it working in this document?

SergeyMak
Partner Ambassador
Partner Ambassador

So. it works as well

I added trigger for a field Omniture.Date OnSelect

Set Variable dateFrom with value =IF(GetSelectedCount(Omniture.Date)=0 AND GetSelectedCount(Omniture.Date)=0,Null(),dateFrom)

Set Variable dateTo with value =IF(GetSelectedCount(Omniture.Date)=0 AND GetSelectedCount(Omniture.Date)=0,Null(),dateTo)

PFA

Regards,
Sergey