Filter the tasks which have not been accepted by any user

Certified Senior Developer

Have a task report for fetching the tasks assigned to a pool of users including logged in user.

We have a requirement to filter the tasks which have not been accepted by any user.

Am using following query filter in queryProcessAnalytics()

a!queryFilter(field:"c6",operator:"is null")
where "c6" denotes the Owner of the task i.e tp!owner

But its not working as expected. The report does not return anything.

Please suggest.

OriginalPostID-217325

OriginalPostID-217325

  Discussion posts and replies are publicly visible

  • 0
    Certified Associate Developer
    Hi Vikrantb,

    tp!owner is something task has been accepted by user...

    Try changing the "C6" column of your process report to tp!assignees .. This should work
    tp!assignees -> tasks which have not been accepted by any user
  • @vikrantb - Does the report return data when you query on other fields ? Or this problem is specific to the Task Owner field ?
  • Hi @Vikrantb,
    You can apply the Default filter as Status = Assigned in the Report options or you can also apply the queryFilter on status field.
  • tp!assignees - List of users and groups who have been assigned the task. The object returned takes the User or Group data type.

    tp!owner(Appian definition) -
    When a task is assigned, the Task Owner property has a null value until the assigned user views the task or until a user in the assigned group accepts the task.
    The Task Owner property can only be used to identify the user who completed a given task. If the task has been assigned to more than one user (if there were multiple users or a group of users) the Assignees property should be used to determine the users that accepted the task.

    Other than tp!owner you can look into "task_assignee_owner()" - Assignee(s) before a task has been accepted or the task owner after the task is accepted.

    And please check the security to the portal report, some times your user might not have permission to the knowledge center/folder where the ".arf" or Appian Report File exists.
  • @vikrantb I would suggest checking how the task properties/attributes behave in various scenarios by performing a minimal amount of testing. For instance, one of the attributes (I don't remember if it's tp!owner or task_assignees_owner) of the task behaves in a different way when the task is assigned to Group compared to a task directly targeted to a User. It would be worth making the conclusions prior to actually making use of the attributes as filters. Also I would suggest checking the Status of the task just in case if you would like to filter the tasks based on status as suggested by other user, especially when the task is directly targeted to user.
  • @vikrantb Hi, as per the results of the testing I did on Appian 16.2 with regards to your post, I have found that the operators namely 'is null','not null' and 'includes' aren't working when used in combination with a!queryProcessAnalytics(). So as per my understanding, the issue isn't about what task attributes (tp!owner/task_assignee_owner etc) we use or how the security is configured and the issues has crept in the filters. Here are a few queryFilters that aren't working in any case and in-fact driving the result-set in an unintended fashion:

    a!queryFilter(field: "c8", operator: "is null")
    /*Where c8's formatting is USER_NAME */

    a!queryFilter(field: "c8", operator: "not null")
    /*Where c8's formatting is USER_NAME */

    a!queryFilter(field: "c8", operator: "is null")
    /*Where c8's formatting is NORMAL_TEXT */

    a!queryFilter(field: "c8", operator: "not null")
    /*Where c8's formatting is NORMAL_TEXT */

    a!queryFilter(field: "c8", operator: "includes", value: fn!loggedInUser())
    /*Where c8's formatting is USER_NAME */

    a!queryFilter(field: "c8", operator: "includes", value: "dummyuser1")
    /*Where c8's formatting is USER_NAME and dummyuser1 is an user in Appian*/

    a!queryFilter(field: "c8", operator: "includes", value: fn!loggedInUser())
    /*Where c8's formatting is NORMAL_TEXT and dummyuser1 is an user in Appian*/

    a!queryFilter(field: "c8", operator: "includes", value: "dummyuser1")
    /*Where c8's formatting is NORMAL_TEXT and dummyuser1 is an user in Appian*/


    For time being, I would suggest opting for the work around as suggested by @rakeshm above - but I would suggest refraining from configuring the filter in the report and make use of the queryFilter. I believe this would be the best bet for you at the moment.

    Please feel free to do let us know if you do have any edge cases in mind that breaks the Task Status filter work around so that we could come up with some alternate ideas.
  • @sikhivahan - Well that's News!!! ... Is it a bug introduced in 16.2 or an existing one ?
  • @sidhantb Even I am surprised by the behavior. Anyhow we can't come to any conclusion until and unless we reproduce the similar behavior on 16.2 Hotfix Package A and versions other than 16.2.
  • +1
    Certified Senior Developer
    I have now used Status filter as of to get the tasks not accepted by anyone. I am using verison 7.11. So I believe this is an old bug which has not been fixed yet.
  • Hi Vikrant, You can try Task Metrix utility. The main process model runs on a timer to query all tasks in the system and save important metrics to the database. Tou can filter the task usin query function

    forum.appian.com/.../summary