/scripts/ahub.form.attachments.js
0

How to get the phase with latest time

Jan 12, 2017 at 11:55 AM

20

avatar image

Hi Experts,

We have write a custom Query to get the document phase start time from the workflow table, the query brings all the phases that equal the current phase. e.g, If a document has been to phase "CONTRACT APPROVAL" twice, the query will bring back two rows, whilst we only need the latest one.

SELECT B.PHASE A.START_DATETIME AS START_DATE,

FROM

<%SCHEMA%> .FCI_CONGEN_CONTRACT_DOC B

LEFT OUTER JOIN FCI_DOC_WORKFLOW_HISTORY A

WHERE

AND B.CURR_CONFIG_PHASE_OBJECT_ID = A.PHASE_REF_OBJECT_ID

Many Thanks

Gino

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers

Skip to Content