Expression to convert [Group:##] into text

is there an expression to convert this value: [Group:##] into a text field? Our process analytics report saves task assignees as text when they are people and [Group:##] when they are groups, and we are trying to show the text name of the group in a paging grid in the same column as the text assigned person. We've tried the People functions with no success. We are using this feature as part of the task reassignment smart service and everything works as designed except the display of the group. Thanks!...

OriginalPostID-89270

OriginalPostID-89270

  Discussion posts and replies are publicly visible

Parents
  • HI,

    You can use the below code. I have used the same in my project.

    Create a below rule and use this in forEach expression in your gridTextColumn component.

    if(
    rule!APN_isEmpty(
    ri!usrOrGrp_txt
    ),
    null,
    if(
    rule!APN_isEmpty(
    togroup(
    ri!usrOrGrp_txt
    )
    ),
    rule!getFullNameFromUsername(
    ri!usrOrGrp_txt
    ),
    if(
    doesgroupexist(
    tointeger(
    ri!usrOrGrp_txt
    )
    ),
    group(
    tointeger(
    ri!usrOrGrp_txt
    ),
    "groupName"
    ),
    rule!getFullNameFromUsername(
    ri!usrOrGrp_txt
    ))))

    ***************************
    Where rule!getFullNameFromUsername is as below:

    ***************************
    if(
    rule!APN_isEmpty(
    ri!username_txt
    ),
    null,
    if(isusernametaken(ri!username_txt),
    user(
    ri!username_txt,
    "firstName"
    ) & " " & user(
    ri!username_txt,
    "lastName"
    ),null)
    )

    Thanks,
    J. Neelima
Reply
  • HI,

    You can use the below code. I have used the same in my project.

    Create a below rule and use this in forEach expression in your gridTextColumn component.

    if(
    rule!APN_isEmpty(
    ri!usrOrGrp_txt
    ),
    null,
    if(
    rule!APN_isEmpty(
    togroup(
    ri!usrOrGrp_txt
    )
    ),
    rule!getFullNameFromUsername(
    ri!usrOrGrp_txt
    ),
    if(
    doesgroupexist(
    tointeger(
    ri!usrOrGrp_txt
    )
    ),
    group(
    tointeger(
    ri!usrOrGrp_txt
    ),
    "groupName"
    ),
    rule!getFullNameFromUsername(
    ri!usrOrGrp_txt
    ))))

    ***************************
    Where rule!getFullNameFromUsername is as below:

    ***************************
    if(
    rule!APN_isEmpty(
    ri!username_txt
    ),
    null,
    if(isusernametaken(ri!username_txt),
    user(
    ri!username_txt,
    "firstName"
    ) & " " & user(
    ri!username_txt,
    "lastName"
    ),null)
    )

    Thanks,
    J. Neelima
Children
No Data