Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
svsudhakar
Creator
Creator

scheduler Problem


Hi,

I have created one PDF report, I need to schedule that report as weekly , last week  and quarterly reports .

currently manually I am selecting the calendar in the dashboard and sharing the reports .now I need to schedule that reports .

please suggest is there any way to select the last week dynamically in scheduler.

Thanks in Advance,

1 Solution

Accepted Solutions
Not applicable

Hi Sudhakar,

you might want to look at the Inweek() function, makes for a simpler code.

Inweek(Date, today(), -1)*-1 AS [Last Week]

-1 in the function offsets to the prior week, *-1 to then turn the trues to positive


hope that helps

Joe

View solution in original post

5 Replies
tresesco
MVP
MVP

Last week: =Week(Today())-1

svsudhakar
Creator
Creator
Author

Is it possible to write this expression in scheduler level

tresesco
MVP
MVP

You want to select last week from a field in the application, right? If so, create an inline field with two values like :

Let vCurrWeek=Week(Today());
Let vLastWeek=$(vCurrWeek)-1;
Load * Inline [
Week, WeekSel
$(vCurrWeek), $(vCurrWeek)
$(vLastWeek), $(vLastWeek)
]
;

Now use this WeekSel field for selection in the publisher/server.

 

svsudhakar
Creator
Creator
Author

Hi tresesco,

Thanks for your reply. With inline table I am able to select the last week but its not giving the current year. Its giving irrespective of all years.

I have created the same flag in script level as below its working fine.

if( Year(Today())=year(Date),if( Week(Today())-1 =Week(Date),1,0)) as [Last Week],

Not applicable

Hi Sudhakar,

you might want to look at the Inweek() function, makes for a simpler code.

Inweek(Date, today(), -1)*-1 AS [Last Week]

-1 in the function offsets to the prior week, *-1 to then turn the trues to positive


hope that helps

Joe