Skip to main content
andreiionuti0001
January 26, 2022
Question

Task Report with multiple assignees

  • January 26, 2022
  • 10 replies
  • 0 views

Hello,

I have create a Process Task Report having as Report Context multiple processes.

I used the a!queryProcessAnalytics to retrieve the data, the only problem is if in column "Assigned to" (tp!assignees) if I have multiple assignments (Group1 and Group2 or Group1 and User1) I won't be able to retrieve the tasks based on the loggedinuser and the groups that is member of (having only one assignee it works.)

          logicalexpressions: a!queryLogicalExpression(
            operator: "OR",
            filters: a!localVariables(
              local!groups: getgroupsformemberuser(user: ri!user),
              {
                a!forEach(
                  items: local!groups,
                  expression: a!queryFilter(
                    field: "c1",
                    operator: "in",
                    value: fv!item,
                    applywhen: not(rule!APN_isBlank(ri!user))
                  )
                ),
                a!queryFilter(
                  field: "c1",
                  operator: "in",
                  value: ri!user,
                  applywhen: not(rule!APN_isBlank(ri!user))
                )
              }
            )
          )

Any ideas how it should be handled or another solution that should be applied?

10 replies

harshitb6843
January 26, 2022

Hi there,

Try using this. 

logicalExpressions: a!queryLogicalExpression(
        operator: "OR",
        filters: a!forEach(
          items: ri!assignee_txt,
          expression: 
          a!queryFilter(
            field: "c4",
            operator: "includes",
            value: concat(tostring(fv!item),";"),
            applyWhen: not(rule!VP_utils_checkIsNull(fv!item))
          ),
        )
      )

ri!assignee_txt is List of User or Group

andreiionuti0001
January 26, 2022

hi [mention:ef600ff8f5d2497eb2def2126dc89484:e9ed411860ed4f2ba0265705b8793d05] I have tried and it doesn't work. :(

harshitb6843
January 26, 2022

Maybe because the output type I configured in my report doesn't match yours. Adding a screenshot below of my report.