asked on February 7, 2024
I am trying to find a way to search by Team User to see what Forms Processes they are associated with.
Looking for something below like what @Matthew Tingey replied back in January of 2022.
DECLARE @TeamNameSearch VARCHAR(100), @TeamID INT SET @TeamNameSearch = 'Business Services' --Enter the name of the team you want to search here SET @TeamID = -1 SELECT @TeamID = [id] FROM LF_Forms.dbo.teams WHERE [name] = @TeamNameSearch; SELECT bp.[name] AS process_name, step.[step_type], step.[name] AS step_name, step.[definition_json] FROM [LF_Forms].[dbo].[cf_bp_steps] AS step LEFT JOIN [LF_Forms].[dbo].[cf_bp_processes] AS bpp ON bpp.[process_id] = step.[process_id] LEFT JOIN [LF_Forms].[dbo].[cf_business_processes] AS bp ON bp.[bp_id] = bpp.[bp_id] WHERE step.[definition_json] LIKE CONCAT('%"teamId":', @TeamID, '%') AND step.[definition_json] LIKE '%"teamEnabled":true%' AND step.[is_deleted] = 0 AND bp.[is_deleted] = 0 ORDER BY process_name asc;
Thanks for any ideas!
Pete
0
0