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
  • 0
    Certified Lead Developer

    Also in case it helps, I have a similar task report which passes the value(s) in the "assignee" column into this rule, essentially "APN_displayGroupOrUser()", with a single rule input of type "user or group".

    if(
      runtimetypeof(ri!groupOrUser) = 'type!{http://www.appian.com/ae/types/2009}Group',
      if(
        isnull(ri!groupOrUser),
        null(),
        group(togroup(ri!groupOrUser), "groupName")
      ),
      rule!APN_displayUser(user: ri!groupOrUser)
    )

Reply
  • 0
    Certified Lead Developer

    Also in case it helps, I have a similar task report which passes the value(s) in the "assignee" column into this rule, essentially "APN_displayGroupOrUser()", with a single rule input of type "user or group".

    if(
      runtimetypeof(ri!groupOrUser) = 'type!{http://www.appian.com/ae/types/2009}Group',
      if(
        isnull(ri!groupOrUser),
        null(),
        group(togroup(ri!groupOrUser), "groupName")
      ),
      rule!APN_displayUser(user: ri!groupOrUser)
    )

Children