Hi, you can try create Stored Procedure
WITH cte AS (
SELECT ps.[DisplayName] AS [ProcessName],pi.Folio,a.DisplayName AS [ActivityName],pi.Originator, aid.[User] AS [AssignedTo], wlh.[Data] AS [Task URL] --,wlh.InstructionField, pi.DelegatedBy --,aid.* --
FROM [K2DB].[Server].[WorklistHeader] wlh
JOIN [K2DB].[Server].[WorklistSlot] wls ON wls.ActInstID = wlh.ActInstID AND wls.EventInstID = wlh.EventInstID AND wls.ProcInstID = wlh.ProcInstID and wls.Status != 4
JOIN [K2].[Server].[ProcInst] pi WITH (NOLOCK) ON pi.ID = wlh.ProcInstID
JOIN [K2].[Server].[Proc] p WITH (NOLOCK) ON p.ID = pi.ProcID
JOIN [K2].[Server].[ProcSet] ps WITH (NOLOCK) ON ps.ID = p.ProcSetID
JOIN [K2].[Server].[Act] a WITH (NOLOCK) ON a.ID = wlh.ActID
JOIN [K2].[ServerLog].[ActInstDest] aid WITH (NOLOCK) ON aid.ID = wlh.ActInstDestID AND aid.ProcInstID = wlh.ProcInstID AND aid.ActInstID = wlh.ActInstID
WHERE aid.[User] = 'K2:domainusername'
)
SELECT * FROM cte
Thanks for your solution. But does this mean that a "normal way with normal built-in SmartObjects" is not possible?