filter is not working on task report data

Certified Lead Developer
I am trying to use work with below snippet, the filter is no applying on process analytics.
With or with out filter is giving me the same result.Here filed "c8" contains Assigned To values for the task(i.e user(s) /group(s)).
Here I am trying retrieve the tasks assigned to particular group /(user),but it is fetching all the tasks.
a!queryProcessAnalytics(
          report:cons!TASK_REPORT,
          query:a!query(
                    filter:a!queryFilter(field:"c8",operator:"includes",value:togroup(876)),
                    pagingInfo:topagingInfo(1,-1)          
          )
)

OriginalPostID-244965

  Discussion posts and replies are publicly visible

Parents
  • I would like to add few things here out of my experience:
    1. "=" operator isn't the right criteria as per my knowledge. This holds good only if the value is of type single. If we would like to apply it for values that are of type multiple, then the valid operator to be applied in 'logicalExpression' is 'AND'. This means that we can get only those rows that has the task assignees as the inputted filter value and we will miss the use case - 'Get me any of the rows that has task assignees among the inputted filter value'. Still if we would like to go with "=", we need to align the data properly, that is, the order in the Portal Report and the Filter Value should be the same, this is because, as we are sending the lists, and matching it with a list in each row, their order, formatting, delimiters should be completely same in order to get the matching rows.
    2. fn!joinarray() can't be applied directly because this results in formatting of the Group as [Group:<group_id>] which becomes tough while applying filters. Again this requires the filter value to be formatted in case of Group which isn't really needed provided if we properly format the values in the report itself. This applies only in case of '=' operator.
    3. And finally I would like to add that a single query filter against the Assignee column isn't sufficient to accomplish the use case properly as per my knowledge. If we use a single use case, we would be left with accomplishing the use case with following drawbacks:
    a. We miss the use case where we need to get a task provided if the task assignee is any one of the filter values
    b. We need to sort the report data prior to formatting the data (i.e. applying joinarray() in the Task Report) and also should sort the data in the filter value. And then, even the delimiters applied in both the places should be the same. This is because matching a list with list should be the same in terms of order and the delimiter as well.
    c. Afaik logic of applying single filter deifies when the filter value is a combination of multiple values and complicates the filtering even if it's possible.

    @ramanjaneyulut I have devised a approach which will allow to filter the task assignees in the Report irrespective of the type or values(can be a User, List of users, Group, List of Groups, List of Users and Groups). Also, applying an OR operator gives you the list of tasks in which the filter values are individually or together a part of, and applying the AND operator gives only those tasks that the filter values are together a part of.

    Attached a document and application(well documented to maximum extent). Let me know if you have any questions in case if you try the approach attached be me here.

    PC Search task assignees.zip

    PC Search task assignees.docx

Reply
  • I would like to add few things here out of my experience:
    1. "=" operator isn't the right criteria as per my knowledge. This holds good only if the value is of type single. If we would like to apply it for values that are of type multiple, then the valid operator to be applied in 'logicalExpression' is 'AND'. This means that we can get only those rows that has the task assignees as the inputted filter value and we will miss the use case - 'Get me any of the rows that has task assignees among the inputted filter value'. Still if we would like to go with "=", we need to align the data properly, that is, the order in the Portal Report and the Filter Value should be the same, this is because, as we are sending the lists, and matching it with a list in each row, their order, formatting, delimiters should be completely same in order to get the matching rows.
    2. fn!joinarray() can't be applied directly because this results in formatting of the Group as [Group:<group_id>] which becomes tough while applying filters. Again this requires the filter value to be formatted in case of Group which isn't really needed provided if we properly format the values in the report itself. This applies only in case of '=' operator.
    3. And finally I would like to add that a single query filter against the Assignee column isn't sufficient to accomplish the use case properly as per my knowledge. If we use a single use case, we would be left with accomplishing the use case with following drawbacks:
    a. We miss the use case where we need to get a task provided if the task assignee is any one of the filter values
    b. We need to sort the report data prior to formatting the data (i.e. applying joinarray() in the Task Report) and also should sort the data in the filter value. And then, even the delimiters applied in both the places should be the same. This is because matching a list with list should be the same in terms of order and the delimiter as well.
    c. Afaik logic of applying single filter deifies when the filter value is a combination of multiple values and complicates the filtering even if it's possible.

    @ramanjaneyulut I have devised a approach which will allow to filter the task assignees in the Report irrespective of the type or values(can be a User, List of users, Group, List of Groups, List of Users and Groups). Also, applying an OR operator gives you the list of tasks in which the filter values are individually or together a part of, and applying the AND operator gives only those tasks that the filter values are together a part of.

    Attached a document and application(well documented to maximum extent). Let me know if you have any questions in case if you try the approach attached be me here.

    PC Search task assignees.zip

    PC Search task assignees.docx

Children
No Data