Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
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

Sorry I made the answer as correct earlier. But when I clear all selections in qvw I can not able to see the last weeks data. please help me how to set this?

Not applicable
Author

Please help me. I was really confusing here.

Roop
Specialist
Specialist

For attachments:

objEmail.To = "username@domain.com"        'Email Recipient     

objEmail.From = "REPORTS@domain.com"                        'Email Sender     

objEmail.Subject = "The name of the report"                        ' Subject     

objEmail.TextBody = "some text in the body of the mail"        'Text of email.   

objEmail.AddAttachment   "c:\DOC\document1.pdf"   'Attachment to add

Roop
Specialist
Specialist

What selections are you clearing?

There has been no mention of selections as yet ....

Is this a listbar that has been cleared down? Should the setting on the listbar be "Always Select One Value" as this will ensure that the values cannot be cleared from the listbar as there has to always be 1 value selected.

Not applicable
Author

Thanks. I can not able to get last weeks data. Instead excel file showing all weeks data.

I created variables like below

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

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

I made triggers in documents properties as

vStartDate OnChange as ='>='&vStartDate & '<=' & vEndDate

vEndDate OnChange as ='>='&vStartDate & '<=' & vEndDate

Am I doing anything wrong here?


Roop
Specialist
Specialist

Tricky ... as you are resetting the values and it seems as though you should only be setting your values for vStartDate on reload. I think that they are resetting themselves with the same selection each time.

Not applicable
Author

Is there any way to set this? Please help me.

Roop
Specialist
Specialist

Yes, I think that you should be able to trigger vStartDate and vEndDate on Reload and not change ....

Not applicable
Author

You mean OnInput?

Roop
Specialist
Specialist

On PostReload in document properties