Skip to main content
janc5277
July 10, 2025
Question

Task report not showing "Assigned" tasks

  • July 10, 2025
  • 10 replies
  • 0 views

Hello!

I have a task report which shows tasks from all users that have the current logged in user as their supervisor.  

The problem I'm facing is that tasks with the status "Assigned" are not being shown in the report, which in turn creates a problem where if I reassign a task from someone it immediately goes to status "Assigned" and stops being shown in the report. 

Here is how I pick up tasks from my subordinates.

a!localVariables(
        local!currentUser: loggedInUser(),
        local!directReportUsers: a!queryRecordType(
          recordType: 'recordType!{SYSTEM_RECORD_TYPE_USER}User',
          fields: 'recordType!{SYSTEM_RECORD_TYPE_USER}User.relationships.{SYSTEM_RECORD_TYPE_USER_RELATIONSHIP_directReportUsers}directReportUsers.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_username}username',
          filters: a!queryFilter(
            field: 'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_username}username',
            operator: "=",
            value: local!currentUser
          ),
          pagingInfo: a!pagingInfo(
            startIndex: 1,
            batchSize: 100
          )
        ).data,
        local!reportUsers: local!directReportUsers['recordType!{SYSTEM_RECORD_TYPE_USER}User.relationships.{SYSTEM_RECORD_TYPE_USER_RELATIONSHIP_directReportUsers}directReportUsers.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_username}username']

If anyone had the same problem or if anyone has any insights on this it would be greatly appreciated.

Jan

10 replies

stefanhelzle0001
July 10, 2025

I assume you use a process report to show these tasks. How is this configured? And how do you filter the query?

janc5277
janc5277Author
July 10, 2025

Yes I use a process report which is configured to show all tasks from everyone. 

Then I use the code below to actually filter the task to show only tasks from the users subordinates.

local!taskReportData: a!refreshVariable(
          refreshOnVarChange: local!refreshTrigger,
          value: a!queryProcessAnalytics(                                         
            report: cons!GBKR_ALL_TASKS,                                  
            query: a!query(
              pagingInfo: a!pagingInfo(                                    
                startIndex: 1,                                             
                batchSize: 500,                                             
                sort: a!sortInfo(                                          
                  field: "c2",                                             
                  ascending: true                                          
                )                                                          
              ),
              logicalExpression: a!queryLogicalExpression(
                operator: "AND",
                filters: 
                {
                  a!queryFilter(
                    field: "c4",                                                
                    operator: "in",                                             
                    value: local!reportUsers
                  ),
                  a!queryFilter(                                        
                    field: "c1",                                                
                    operator: "in",                                             
                    value: local!statusFilter,                                  
                    applyWhen: a!isNotNullOrEmpty(local!statusFilter)
                  )
                }
              )                                                            
            )
          )
        ),

stefanhelzle0001
July 10, 2025

When configuring the process report, do you see the tasks as expected?