Skip to main content
Newcomer
June 18, 2026
Question

Task Manager: Require Attachment Before Marking Task as "Prepared"

  • June 18, 2026
  • 1 reply
  • 0 views

Hi everyone,

We have a requirement from our business users to make it mandatory to attach supporting documentation to certain tasks before they can be marked as "Prepared" in Task Manager.

We reached out to OneStream Support, and they confirmed this isn't supported out-of-the-box. They did advise that we could accomplish this by leveraging Business Rules or Event Handlers.

Has anyone in the community encountered this request and successfully solved it? If so, we would love to hear your approach. Specifically:

  • Which Event Handler type did you find works best for intercepting a Task Manager status change?
  • Do you have any code snippets for checking if a file attachment exists on a specific task?
  • Are there any performance impacts or pitfalls to watch out for when implementing this?

Thanks in advance for any insights or examples!

1 reply

Member
June 29, 2026

Hi,

This is definitely achievable in OneStream Task Manager! Here's what we found works best:

Recommended Approach: Conditional Status Expression (XFBR)

The cleanest solution is to use the built-in Conditional Status Expression field in the Task Editor. This is purpose-built for blocking status changes based on custom conditions — no need for a full Event Handler.

Here's how to set it up:

1. Create a new XFBR Business Rule (e.g., RequireAttachment_XFBR)
2. Inside it, query the XFW_UTM_TaskDoc table using the task ID — if no attachment exists, return an error message string
3. If an attachment is found, return Nothing to allow the status change
4. In the Task Editor for each relevant task, enable the Conditional Status Expression and point it to your rule

Sample code (VB.Net):
    Dim taskId As String = args.NameValuePairs.XFGetValue("TaskId")

    Dim sql As String = $"SELECT COUNT(*) FROM XFW_UTM_TaskDoc WHERE FKTaskID = '{taskId}'"
    Dim count As Integer = CInt(BRApi.Database.ExecuteScalar(si, False, sql))

    If count = 0 Then
        Return "Please attach supporting documentation before marking this task as Prepared."
    End If
    Return Nothing
End Function

The correct attachment table in Task Manager is dbo.XFW_UTM_TaskDoc, with FKTaskID as the foreign key linking to the task and FileName storing the attached file. There is also a dbo.XFW_UTM_TaskDocInstance table — if you need to validate attachments per specific workflow time period (e.g., per close period), you can add an additional filter on WFTimeName in that table.

Why not the UTM_EventHandler?

You can use the UTM_EventHandler + CustomEvents_TaskManager route, but it's heavier to set up and requires re-applying integration steps after every Task Manager upgrade. The XFBR approach is simpler, upgrade-safe, and gives you per-task control — you only apply it to tasks that actually need an attachment.

A few things to watch out for:
- Users can only add attachments to tasks that have NOT yet been prepared, so make sure users are trained to attach before clicking Prepare
- Keep the SQL query simple (a COUNT with a task ID filter) to avoid any performance impact
- With the XFBR approach you can selectively apply the rule only to specific tasks, giving fine-grained control without affecting every task in the system

Hope this helps 
https://documentation.onestream.com/docs/Content/UTM/Task%20Editor.html

Thanks!
Haritha