Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to build a following trigger - on daily morning reload check weather sales data from last Friday are > 0 for a specific selection. If yes - send email.
What is the expression that would check my 'last Friday' sales data ?
Thank you.
if(Sum({$<WeekDay={'Friday'}>Sales) > 0, 'Yes','No'}
You have to build WeekDay in your calender script
Hi,
I didn't understand you requirement,
Why you want to check last Friday's data only , when you want you app to reload daily.
I think you should check your last day's sale on every reload.
This would be more beneficial.....
For that Create a macro to send mail and trigger it on post reload with condition
if(sum({$<SaleDate={$(=today()-1)}>}Sales)=0,True(),False())
Hi Nitin,
this is a very good question of yours on why I want to check last Friday's data only.
I want to send weekly reports. Weekly means sales data from Monday to Friday. Due to some ERP problems last week data does not appear on Monday. Sometimes it does sometimes it does not. So I do reload on Monday, check if last Friday's data is in. If it is, I prepare last week report. If it is not, I do reload next day - Tuesday. And again - if last Friday data is in (which means also previous day is in) I can prepare and send sales report. If it's not there I need to wait for another reload on Wednesday (ERP data is pushed once a day at night).
Hope that clarifies.
But I want to check only last weeks Friday
With this expression:
if(Sum({$<WeekDay={'Friday'}>Sales) > 0, 'Yes','No'}
I will get check on any Friday (e.g. a month ago) and the report will be triggered.