How to remove prefix value from group using wrapper

if(
  and(
    not(
      rule!APN_isBlank(
        ri!userId
      )
    ),
    isusernametaken(
      ri!userId
    )
  ),
  proper(
    concat(
      {
        user(
          ri!userId,
          "firstName",
          null
        ),
        " ",
        user(
          ri!userId,
          "lastName",
          null
        )
      }
    )
  ),
  if(
    isnull(togroup(ri!userId)),
  ri!userId,
  group(togroup(ri!userId), "groupName")
))
This is code. For this we will get below output. But we want to remove CR from output and display. How can we achive it

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to maaaaj0001

    If it'll be a standard convention within your system that all group names will have the prefix "CR", but you want those group names displayed to end users without the "CR" prefix, you should create an expression rule that is specialized for your system's purpose, wherein you pass a group name (or maybe just the group object itself), get the name, and remove the "CR " text from the beginning.  This is easy to accomplish using standard Appian Text Functions.  An easier example that comes to mind would look like this:

    replace("CR My Group", 1, 3, "")

    Here we take "CR My Group", take the First through Third characters of the name, and replace them with a blank character.

Children
No Data