Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Is it possible to select variable values automatically?

Hi,

I have qvw with macro which will send data to user email automatically. All is fine. The qvw contains two variables

VStartDate and vEndDate.

The data used to send every Monday before 12pm to user email. The completed week data will send. I,e Suppose today is Monday. so, the variables VStartDate and vEndDate contains

VStartDate=21/04/2014 and vEndDate= 25/04/2014. Like this I will manually selecting variables values every week.

My question is, Is there any solution that variables set automatic. I,e without my interference the variable should take before weeks dates. why I am asking is I don't want to miss the data any case in my absence.

Can anyone please suggest me this?

Thanks.

53 Replies
Not applicable
Author

Thanks. Still I can not able to get last weeks instead showing all.

Roop
Specialist
Specialist

I think that you will need to reset your application back to its original state and try the same procedure over again

Not applicable
Author

Sorry did the same but still same

Roop
Specialist
Specialist

Let's see ....

So you have to send the file on Monday only so you need to verify that today is Monday and only then send the file.

I believe that you will probably need some other form of chck to see if it is Monday as you do not need to send anything on any other days of the week.

I think it is also a mistake to call the variables the same ....

Set vStartDateScript and vEndDateScript in your script and change:

vStartDate OnChange as ='>='&vStartDateScript & '<=' & vEndDateScript ...... and the same change for vEndDate as I think that they are overwriting each other when they update.

Not applicable
Author

Thanks. What is vStartDateScript   means? and vStartEndScript means?

Roop
Specialist
Specialist

These ones:

vStartDateScript = WeekStart(Date(Today()-1)

vEndDateScript = WeekEnd(Date(Today()-1)

Sorry

Not applicable
Author

Thanks. Still same showing all weeks data. Is there any solution to set this. Please help me as I am struggling with this.

Not applicable
Author

your problem is when you clear the selection you also clear your variables. you can for example set the date for you variables in an action before you call the macro. or on the action anyselectionchanged.

Not applicable
Author

Thanks. How to set this any example please?

Not applicable
Author

when and how do you call your macro??