Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have just reported the following bug to Qlik and wanted to hear if anyone else is having the same problem:
Right now, if a user subscribes to an object that uses a date variable to define a date range, the object will not show the latest data when recieving the subscription email with a screenshot of the object. Even though, if the user follows the link to the app, the object is shown correctly when opening the app.
Through testing this issue extensively, I've isolated the problem to the pre-evaluation of a variable.
For instance, this expression will NOT show the updated value in the subscription object:
SUM({<
[OrderDate.Calendar.Date]={">=$(vMinDate)<=$(vMaxDate)"}
>}SalesAmount)
...when the variables are defined as the following:
vMinDate: =MonthStart(Today()-1)
vMaxDate: =Date(Today()-1)
However, this expression WILL show the updated value in the object:
SUM({<
[OrderDate.Calendar.Date]={">=$(=$(vMinDate))<=$(=$(vMaxDate))"}
>}SalesAmount)
...when the variables are defined as the following:
vMinDate: MonthStart(Today()-1)
vMaxDate: Date(Today()-1)
(please note the double evaluation of the variables in the expression and the absence of equal signs in the variable expressions)
So while this IS a workaround right now, getting subscriptions to work in our Qlik SaaS environment would require a re-definition of multiple variables and expressions in all the apps where subscriptions could be relevant. This is a big task when in fact the subscription feature is not working as expected or intended.
Anyone else seeing the same behaviour?
This is basically a known limitation and expected behavior. Variables are evaluated at the moment of the creation of the report subscription. There is no way for a variable evaluation to be executed through the snapshot of the current object in the sheet that the subscription takes.
However, it looks like you found the workaround. From an R&D investigation:
"There is a limitation on subscriptions: the value of the variables is persisted at the moment of the subscription creation, so any change in the data is not reflected in the next emails.
It is the case of variables whose value expression is calculated before they are expanded, and they are defined with the '=' sign before the expression.
Note: the variables defined without the '=' sign don't have the same problem as they are calculated when they are expanded."
"Suggested workaround:
Define the variables without the '=' sign; in that case, it might be necessary to define in the expression an aggregation scope like TOTAL to obtain the same behavior."
References:
https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Variables/use-variables-...
https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/define-ag...
Hi, is there any update on this topic? I'm facing the same issue.
BR
Matthias
This is basically a known limitation and expected behavior. Variables are evaluated at the moment of the creation of the report subscription. There is no way for a variable evaluation to be executed through the snapshot of the current object in the sheet that the subscription takes.
However, it looks like you found the workaround. From an R&D investigation:
"There is a limitation on subscriptions: the value of the variables is persisted at the moment of the subscription creation, so any change in the data is not reflected in the next emails.
It is the case of variables whose value expression is calculated before they are expanded, and they are defined with the '=' sign before the expression.
Note: the variables defined without the '=' sign don't have the same problem as they are calculated when they are expanded."
"Suggested workaround:
Define the variables without the '=' sign; in that case, it might be necessary to define in the expression an aggregation scope like TOTAL to obtain the same behavior."
References:
https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Variables/use-variables-...
https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/define-ag...
Are your variables declared in the script editor or as front end variables in the variables table?