Scheduled report uses a condition but constantly runs?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2022 11:35 AM
Hello,
I have setup a report that I want to run the 2nd Tuesday of each month. I have setup the condition below to make it run only on the 2nd Tuesday. However for some reason this keeps triggering every day despite when I check in a background script it shows the results as returning false. Does anyone see what I am doing wrong here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2022 11:47 AM
Hello,
Can you change the Run to periodic, also why to have to if condition instead you can use just one as below:-
if(dayofmonth>8 && dayofmonth<14 && day==2)
{
return true;
}
else
{
return false;
}
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2022 12:45 PM
I tried both of those changes and it still triggering even though it shouldn't be.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2022 07:54 PM
Hello,
Can you apply logs and see what are the values are coming in for each variable. Also apply logs in if and else to check how it is behaving. We will also get to know if the function itself is getting executed or not. and change the return true/return false to below:-
answer = true;
answer = false;
One done let me know the result.
Please mark answer correct/helpful based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-18-2022 12:54 PM
Refer to below link.
Scheduled Reports - Condition Script
If you switch among releases (Tokyo, San Diego, Rome) of this training, you might see different condition scripts. Try utilizing those.
One useful note.