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

Question

Question

overdue instances/tasks

asked on May 9, 2023

In Forms Configuration, we can set a daily email to go out to everyone to let them know what they have in their Inbox. We would like to do somthing similar for overdure instances. Is there a way to configure an email for overdue items?  We would like this to go out weekly and include an overview rather than having individual emails for every instance. 

1 0

Replies

replied on May 9, 2023

It depends on how you define "overdue" instances. The built-in options are all based on assigned tasks and overdue instances are a bit more of an abstract/subjective concept.

One option might be to set up a custom report that runs on a schedule and filters based on your criteria for "overdue" instances. The only limit with that approach is that it would probably send out the email even if there was nothing overdue.

However, we have reports like that set up to notify supervisors of instances that have been sitting/waiting longer than intended so they can follow up with their teams.

If you set it to send the report to a distribution group, or list of email addresses, you don't have to worry about licensing the users since full licenses are only required to access the Reports UI.

0 0
replied on May 9, 2023

I don't think there is a native way to do it.  But I have a process that does this via a custom view I added to my LFForms database, and a workflow to generate and send the emails on the weekly schedule.

I posted the database view on another post yesterday, so I'm just linking to that here.

The Workflow looks like this:

  1. We start with a Custom Query activity to get the list of users that have items that are past due.  This query specifically gets items 7+ days past due.
    SELECT [Assigned to (username)]
          ,[Assigned to (email)]
    FROM [LFForms].[dbo].[active_processes_view]
    WHERE [Step due date] <= DATEADD(DAY, -7, GETDATE())
    GROUP BY [Assigned to (username)], [Assigned to (email)]  
    
  2. Then we use a For Each Row activity to loop through each user returned on step #1.
  3. Within the For Each Row activity:
    1. Create a multi-value token named "Form Details".
    2. Run another Custom Query to get the list of forms that are assigned to the specific user.  The custom query passes in two tokens as part of the query (the two ? items assuming you are using ODBC connection).  Those are: %(CycleThroughEachUser_Assigned to (username)) and %(CycleThroughEachUser_Assigned to (email))
      Once again, this is searching 7+ days past due.
      SELECT [Process Name]
            ,[Instance name]
            ,[Started by]
            ,[Last updated]
            ,[Assigned to]
            ,[Assigned to (username)]
            ,[Assigned to (email)]
            ,[Current step]
            ,[Step start date]
            ,[Start date]
            ,[Instance ID]
            ,[Step due date]
      FROM [LFFormsTest].[dbo].[active_processes_view]
      WHERE [Step due date] <= DATEADD(DAY, -7, GETDATE())
        AND [Assigned to (username)] = ? 
        AND [Assigned to (email)] = ? 
      ORDER BY [Start date] 
      
    3. Then we use a For Each Row activity to loop through each user returned on step #3.2

    4. Within the For Each Row activity
      1. A Conditional Decision activity that is based on whether the iteration of the current row is either divisible by 2 or not.  This just determines and even/odd pattern. 
      2. In either even or odd, we're going to append to the Form Details token, the only difference will be the start of it that sets the background color.  This is going to create an HTML structured table row, with the contents of the current result.
      3. The added value will look like this - again, the only difference is the color at the beginning - this example is white, and I use that on the odd rows, and for the even rows I use a darker color - this makes banded rows in the table.
        <tr style="background-color:white;"><td>%(CycleThroughEachFormBelongingtoUser_Process Name)</td><td>%(CycleThroughEachFormBelongingtoUser_Instance name)</td><td>%(CycleThroughEachFormBelongingtoUser_Started by)</td><td>%(CycleThroughEachFormBelongingtoUser_Last updated#"MM//dd//yyyy"#)</td><td>%(CycleThroughEachFormBelongingtoUser_Assigned to)</td><td>%(CycleThroughEachFormBelongingtoUser_Current step)</td><td>%(CycleThroughEachFormBelongingtoUser_Step start date#"MM//dd//yyyy"#)</td><td>%(CycleThroughEachFormBelongingtoUser_Step due date#"MM//dd//yyyy"#)</td><td>%(CycleThroughEachFormBelongingtoUser_Instance ID)</td></tr>
        
    5. Now we'll email the user (using the .  

      1. In the body of the email, we're going to create the header of the table, and then include the Report Details token, formatted as HTML, within the table (remember that token is full of formatted rows for the table).  The structure of the table will be like this:
         

        <table border="1" style="table-layout:fixed; width:1550; border-collapse:collapse;"><font size="2"><b><tr style="background-color:blue; color:white;"><td width="200">Process name</td><td width="500">Instance Name</td><td width="100">Started by</td><td width="100">Last updated</td><td width="125">Assigned to</td><td width="250">Current step</td><td width="100">Step start date</td><td width="100">Due date</td><td width="75">Instance ID</td></tr></b>%(Form Details#[ ]##"HTML"#)</font></table>
        
      2. The email body can include anything else you need above or below the table.

  4. The end result is that each week (or whatever schedule you have set for the workflow) the users will receive an email with a table of the forms that met the search criteria.

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

Sign in to reply to this post.