validation

Hi,

i have a picker field when i select some particular users names it has to show validation message else no 

i have written like this but it is showing for all users whoever i select in picker field 

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to KM

    Check with below code, If it throws same error check the groups security.

    if(
      not(isusernametaken(ri!approver_txt)),
      cons!CR_NEXT_AUTHORITY_VALIDATION_MESSAGE[2],
      if(
        ri!approver_txt = loggedInUser(),
        cons!CR_NEXT_AUTHORITY_VALIDATION_MESSAGE[1],
        if(
          a!isUserMemberOfGroup(
            ri!approver_txt,
            {
              cons!CR_GRP_ALL_CCC_USER_GROUP,
              cons!CR_GRP_BOARD_OF_DIRECTORS_GROUP
            }
          ),
          cons!CR_NEXT_AUTHORITY_VALIDATION_MESSAGE[3],
          null
        )
      )
    )

Children