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
  • @shashankb I should say that the search isn't straight forward as per what you have described. There are few things as follows which you will need to consider:

    1. You need to split the task assignee information from the report. And then you would be searching using wherecontains(). And moreover you will be applying the search rule iteratively over each record in the datasusbset and then need to build a new datasubset. I believe this imposes burden and may not be great when compared to querying by making use of query filters.
    2. How are you obtaining the data from report? All records or only a few? Let's say I have 1000 records and want to get only 10 records at a time based on the pagination. Let's say we have got 10 records and passed all the 10 records to search rule. What if the search rule returns less than 10 records by disqualifying others? So for this to implement, you should be querying all the records in the first place, that is, make use of batch size as -1 and then apply your search rule, build a new dataset and then finally we need to paginate the new dataset. I believe querying the report with a batch size of -1 is not appreciable and won't work in all cases. And also there isn't a need to get all the records, as in most cases the number of records you show in task report won't be more than 25.

    Finally I opine that searching for the data in a dataset(that too fetching the entire dataset) may not be a wise idea when you already have the ability to apply filters and get the required data.
Reply
  • @shashankb I should say that the search isn't straight forward as per what you have described. There are few things as follows which you will need to consider:

    1. You need to split the task assignee information from the report. And then you would be searching using wherecontains(). And moreover you will be applying the search rule iteratively over each record in the datasusbset and then need to build a new datasubset. I believe this imposes burden and may not be great when compared to querying by making use of query filters.
    2. How are you obtaining the data from report? All records or only a few? Let's say I have 1000 records and want to get only 10 records at a time based on the pagination. Let's say we have got 10 records and passed all the 10 records to search rule. What if the search rule returns less than 10 records by disqualifying others? So for this to implement, you should be querying all the records in the first place, that is, make use of batch size as -1 and then apply your search rule, build a new dataset and then finally we need to paginate the new dataset. I believe querying the report with a batch size of -1 is not appreciable and won't work in all cases. And also there isn't a need to get all the records, as in most cases the number of records you show in task report won't be more than 25.

    Finally I opine that searching for the data in a dataset(that too fetching the entire dataset) may not be a wise idea when you already have the ability to apply filters and get the required data.
Children
No Data