Task Reports displaying Multiple Assignees

 I have built a Task Report following the Task Report Tutorial.  I have some tasks with multiple assignees, and those are showing in the report.  But the report only shows the User Id or Group Id - eg VI1234 or [Group: 1234].

 
Task Name
Customer Name
Start Date
Due Date
Assignee
Status

Bye

11/04/17 11:47

 

[Group:2920]; [Group:2916]

 

Bye

11/04/17 11:23

 

[Group:2920]

 

Emsley

10/04/17 13:32

11/04/17 13:32

VI1234

Overdue

Emsley-Alpha

11/04/17 08:33

 

AB9876

 

I need to be able to convert these to a name suitable for display.  I already have a rule which will convert a single User or Group to a display name, and a wrapper for this that will deal with arrays of User or Group, eg converts VI1234 to 'Paul Emsley' and converts [Group: 1234] to 'Admin Team - Payments'

I have tried several ways to get this to work, but always end up with a message saying that a grid component has an invalid value for “totalCount”. “totalCount” must not be null or less than the number of items in any of the “data” arrays, but “totalCount” was 4 and the largest column data array had 5 items.  This is because I have 4 tasks, but one of them has two assignees, giving 5 assignees in total.

Can anybody tell me how to get the assignee column to show display names when there may be more than one assignee per task?

  Discussion posts and replies are publicly visible

  • +1
    Certified Lead Developer
    It sounds like your wrapper rule returns a list, you'll probably need to concatenate them into a string for display. Ex. joinarray(resultOfYourWrapper(), ", ")
  • Hi Paul,

    I've dealt with this issue previously.  I ended up having to create a custom expression rule called e.g. "GLOBAL_displayListOfGroupsOrUsernames" which you can then apply over the Assignee column in your SAIL form grid (and as a side note, this also requires a column in your portal report containing the Assignees, but which has been force-converted to plaintext).

    Here's the function:

    if(
      rule!APN_isBlank(ri!list),
      "",
      
      joinarray(
        apply(
          rule!FTA_GLOBAL_displayListOfGroupsOrUsernames_sub(
            input: _
          ),
          trim( split( ri!list, ";" ) )
        ),
        if(
          rule!APN_isBlank(ri!separator),
          ", ",
          ri!separator
        )
      )
    )

    And in your Paging Grid, you would add a column like this:

    a!gridTextColumn(
      label: "Assigned To",
      field: "c14",
      data: apply(
        rule!GLOBAL_displayListOfGroupsOrUsernames(
          list: _,
          separator: " / " & char(10)
        ),
        property(local!dataSubset.data, "c14", {})
      )
    )

    (note that you'd replace "c14" with the column it ends up being in your task report.)