I try to build table with short history to put it in protocol (word>>pdf) of acceptance
So i would like to have 3 columns:
1) person
2) behalf (if was)
3) time step
at the moment I'm struggle with filtration .... skip save or other than end step paths ...
in green lat 2 - the "steps" where I clicked - finish ..live the step ...
where I have 1 person and no waiting for other to finish - it was easy ..
but if in step I have assigned 2-3 people and one of then is behalf
then ... is more difficult ...
SQL query:
[code="SQL"]
SELECT
WFH_ID as 'ID of history',
WFH_STPID as 'Krok ID',
WFH_FinishDurationDateTime AS 'Data ukończenia kroku',
WFH_LeaveCurrentStepPath,
WFH_LeaveCurrentStepDate,
WFH_IsLastVersionInCurrentStep,
WFH_Impersonator,
dbo.clearwfelem(WFH_LeftBy) AS 'Zatwierdzone przez',
dbo.clearwfelem(WFH_LeftByImpersonator) AS 'W Zastępstwie',
FORMAT(
CASE
WHEN WFH_LeaveCurrentStepDate IS NULL THEN WFH_FinishDurationDateTime
ELSE WFH_LeaveCurrentStepDate
END, 'dd.MM.yyyy HH:mm:ss'
) AS 'Data akceptacji'
FROM
WFHistoryElements
WHERE
WFH_OrgID = {WFD_ID}
AND WFH_STPID = {ST:369}
and WFH_IsLastVersionInCurrentStep<>''
-- AND WFH_LeftByImpersonator <> ''
[/code]
P.S.
webcon 2024.1.161