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

Question

Question

Report on Reassigned Tasks within a Forms Process

asked on June 10, 2019

Hello,

 

I'd like to report on tasks reassigned within a process.

 

Scenario:

 

User submits form.

Based on questions answered on this form, the process assigns a task to Team A, Team B, or Team C.

If the initiator answered the questions incorrectly, the assigned team can reassign to the correct one.

I would like to identify trends and training opportunities for users who are not answering the questions correctly. I do not want our teams to have to email these users directly on a case-by-case basis.

 

Thanks! 

1 0

Replies

replied on February 11, 2022

Okay, I was able to get what I needed with SQL. Hopefully it can help you too. 

 

-- SQL to find forms that were reassigned for a given step

SELECT
    cbwi.bp_instance_id AS FormNumber
  -- ,cf.process_id -- I just looked through the [cf_bp_main_instances] table to find the bp instance id for my forms process I wanted to look at.
  -- ,cf.step_id -- You can get this from the upper right corner in the business process flow inside the forms designer
   ,CONVERT(NVARCHAR, cf.task_first_assigned_date, 101) AS TaskFirstAssgnd
   ,CONVERT(NVARCHAR, cf.due_date, 101) AS DueDate
   ,CONVERT(NVARCHAR, cf.finish_date, 101) AS FinishDate
   ,cf.[status]
   --,cf.owner_snapshot_id
   ,cus.username AS OwnerUserName
   ,cf.assigned_comment
   --,cf.target_snapshot_id
   ,cus1.username AS TargetUserName
   --,cf.team_id
   ,T.[name] AS TargetTeamName


FROM LF_Forms.dbo.cf_bp_worker_instance_history cf
LEFT JOIN cf_user_snapshot cus      -- Pulling in the Username of the person who originally had the tasks
    ON cf.owner_snapshot_id = cus.id
LEFT JOIN cf_user_snapshot cus1        -- Pulling in the Username of the person who the task was reassigned to
    ON cf.target_snapshot_id = cus1.id
JOIN cf_bp_worker_instances cbwi
    ON cf.instance_id = cbwi.instance_id
LEFT JOIN teams t ON cf.team_id = t.id
WHERE cf.[status] LIKE 'reassigned'
AND cf.process_id = 33 -- This needs to be changed to the process ID you are looking for
AND cf.step_id = 40    -- This should be changed to the step you want to look at
ORDER BY FormNumber
1 0
replied on February 10, 2022

Did you ever figure this out? Maybe even a SQL of the forms database? 

I am trying to figure out if I should turn off the option to reassign at a certain step. The option is being used in a way that is disrupting my forms approval logic down stream. But I want more data to tell if it would impact other legitimate uses. 

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

Sign in to reply to this post.