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?
Discussion posts and replies are publicly visible
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
hi I have tried and it doesn't work. :(
Maybe because the output type I configured in my report doesn't match yours. Adding a screenshot below of my report.
I have tried also like this and it doesn't work.
QueryProcessAnalytics does not support logicalExpressions. I solved it by concatenating all users/groups into a single string. The filter with an "includes" operator.
I think it does support that. QueryProcessAnalytics has 'query' property in which we can use logicalExpressions. Also, I have done the same thing in my code. I have concatenated all the values in a single string and I am using logicalExpressions to get tasks for multiple assignees at once.