Expression evaluation error at function 'group' [line 13]: The passed parameter(s) are of the wrong type. Received the type List of Group.

A Score Level 1

I have created this rule to get the group names from my task report in a grid . but when there are multiple groups are present at assignee column, it gives error saying invalid group exception.

Here is the code:

 if(
  or(
    runtimetypeof(
      ri!groupOrUser
    ) = tointeger(
      'type!{http://www.appian.com/ae/types/2009}Group'
    ),
    like(
      ri!groupOrUser,
      "?Group:*"
    )
  ),
 touser(group(
    togroup(
      touniformstring(
        ri!groupOrUser
      )
    ),
    "groupName"
  )),
  rule!APN_displayUser(
    touser(
      ri!groupOrUser
    )
  )
)


Rule input-user or group

Any suggestions?

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to Tan18
    1. you don't need the if() statement checking for a totalcount of 0; the a!forEach() statement already handles an empty set gracefully.
    2. Check whether your report is returning "people" (user or group) data or String data.  If it's returning String data then the code in the handler rule might not be interpreting it correctly.
    3. to confirm, can you show the configuration you have set up for your "testgroupDisplay()" rule, including your rule input?  Screenshotting mine here again for reference.
Children