Discussion

48
Views
Close popover
Srujan kumar goud Bollipally (SrujankumargoudB)
Aaseya IT Services
Associate Consultant
Aaseya IT Services
ZA
SrujankumargoudB Member since 2017 5 posts
Aaseya IT Services
Posted: 3 weeks 2 days ago
Last activity: 3 weeks 2 days ago

Get Week Number from a given Date along with FromDate and To Date of the Week

To get the Week number from a given date. I have achieved this by the below steps.

1. Create a Data Type With FromDate (Date Only), ToDate (Date Only), WeekNumber, MonthName,  Sno(PrimaryKey) columns. 

2. Dump the excel sheet to Data type (Collected "List of Week Numbers of the current year" from google)

3. Create a table in the Section and give the source as Dpage.

4. Create a DataTransform / Activity.

5. Pass Month as Parameter to DPage. You can get Month Name by using the below function

@(Pega-RULES:DateTime).FormatDateTime(@(Pega-RULES:DateTime).CurrentDateTime(), "MMMMM", "", "")

6. Set Param.TodayDate (You can get Today Date by using the below function @getCurrentDateStamp())

7. Loop the DPage. Set the From Date and To Date as Params.

8. Check the When Condition as: Param.TodayDate>=Param.FromDate && Param.Todaydate<=Param.ToDate.

9. Check the Results in Screen. 

TSM

 

For Details Steps please refer to this document attached below.

 

Thanks,

Srujan

***Edited by Moderator: Pooja Gadige to change content format from Idea to Discussion, move from Pega Academy to Product, add Developer Knowledge Share tag, add platform capability tag***
Pega Platform 8.3 Case Management User Experience Senior System Architect Developer Knowledge Share