You are viewing limited content. For full access, please sign in.

Question

Question

Is there a forms feature to be able to see how many forms processes a team is used in?

asked on January 28, 2022

I am purging unused teams and would like to know if a team is used in a Forms process, and if so, how many and which processes.

Is there a feature to do this? Or maybe a way to DIY via the Custom Reports? (Though I doubt it since I believe reports are process specific?)

0 0

Replies

replied on January 28, 2022

Here's a database search you can run that should find any user tasks assigning tasks via a particular team name. 

DECLARE @TeamNameSearch VARCHAR(100), @TeamID INT
SET @TeamNameSearch = 'Old Team Name'   --Enter the name of the team you want to search here
SET @TeamID = -1

SELECT @TeamID = [id]
FROM [LFForms].[dbo].[teams]
WHERE [name] = @TeamNameSearch;

SELECT
  bp.[name] AS process_name,
  step.[step_type],
  step.[name] AS step_name,
  step.[definition_json]
FROM [LFForms].[dbo].[cf_bp_steps] AS step
LEFT JOIN [LFForms].[dbo].[cf_bp_processes] AS bpp ON bpp.[process_id] = step.[process_id]
LEFT JOIN [LFForms].[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;

 

2 0
replied on January 31, 2022

The one "gotcha" here is that we have "Assign team by variable" at play.

If the team is being set with a variable it can't be tracked like that, so the query would certainly be helpful, but it won't catch those ones.

2 0
replied on January 31, 2022

That's very true @████████

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.