Skip to main content
Question

Approvers

  • December 29, 2023
  • 2 replies
  • 3 views

I would like to retrieve the second and third approver of the timesheet.

 

Can you help me? I'm trying this logic, but it's not working :

 

 

PU_FIRST (

 

  "ESSR_MIRO",

 

  "_CEL_ESSR_ACTIVITIES"."USER_NAME",

 

  "_CEL_EBAN_ACTIVITIES"."ACTIVITY_PT" = 'Release'

 

  INDEX_ORDER ( "_CEL_ESSR_ACTIVITIES"."USER_NAME",

 

 

   ORDER BY ( "_CEL_ESSR_ACTIVITIES"."EVENTTIME" ASC),

   

   PARTITION BY("_CEL_ESSR_ACTIVITIES"."LBLNI" ) = 2

)

 

 

2 replies

  • Celonaut
  • January 11, 2024
Hi - Do you get any error messages? Are you able to pull first approver successfully?

janpeter.van.d
Level 12
Forum|alt.badge.img+26

Hi @douglas.henri,

 

If the code above is a copy of your version, then I think you miss an 'AND' operator before the INDEX_ORDER statement.

Next to that, I think the function INDEX_ACTIVITY_TYPE can make your query easier (see INDEX_ACTIVITY_TYPE (celonis.com)).

Your query would be:

 

PU_FIRST (

 "ESSR_MIRO",

 "_CEL_ESSR_ACTIVITIES"."USER_NAME",

 "_CEL_EBAN_ACTIVITIES"."ACTIVITY_PT" = 'Release'

AND INDEX_ACTIVITY_TYPE = 2

)

 

I hope this helps!

 

Best regards,

Jan-peter