How to get Name of user who performed any activity prior to a given activity

#1

Hi Experts,

I have a small query.
I need to get the name of user who performed any activity prior to a given activity.

E.g. when a PO is fully approved we have an activity called “PO Approved”. I need name of the user who did the last approval. last approval activity will be just prior to “PO Approved” activity.

Thank you in advance. :smiley:

Regards,
Sachin

#5

Hi Sachin,

you can use the following code which will give you the user name for the previous activity:

PU_LAST(“EKPO”, “_CEL_P2P_ACTIVITIES”.“USER_NAME”, PROCESS_ORDER("_CEL_P2P_ACTIVITIES".“ACTIVITY_EN”) =
PU_LAST(“EKPO”, PROCESS_ORDER("_CEL_P2P_ACTIVITIES".“ACTIVITY_EN”), “_CEL_P2P_ACTIVITIES”.“ACTIVITY_EN” = ‘PO Approved’)-1)

Best regards,
Viana

2 Likes
#7

Hi Viana,

This solution worked perfectly as expected.

Big Thank You :slight_smile:
Regards,
Sachin