Question

8
Replies
134
Views
vigog Member since 2019 17 posts
PEGA
Posted: April 30, 2020
Last activity: May 1, 2020
Solved

Concatenate functions in Expression Builder

Hello, 

I am working on a scenario where I need to set a Date Property to the Monday of the current week. So an example, current date is 20200430 (Thursday), I need to find 20200427 (Monday).

I couldn't find a function that does this for me, so I am working with a Data Transformation Expression Builder to get there.

I have identified already a could of functions that can help me:

@(Pega-RULES:DateTime).getCurrentDateStamp()     --> returns current date

@DateTime.weekday(20200430)   --> returns 5

and then ... I don't know yet, I have to think about that, but the issue I am facing is that I don't know how to link to two.

I tried with local variables:

var x = @(Pega-RULES:DateTime).getCurrentDateStamp()    --> generates and error, I don't think it's supported

I tried linking the 2 expressions:

@DateTime.weekday(@(Pega-RULES:DateTime).getCurrentDateStamp() )   --> generates another error

 

Any suggestions on how can I do what I need?

 

Cheers.

Pega Platform 8.4 Case Management Solutions Consultant
Share this page LinkedIn