will only check if the if name is used. I want to check both name and another field. Tried this but no luck.
if (count(team_member[firstname == input.firstname]) > 0) && (count(team_member[lastname == input.lastname]) > 0)
{
alert "We found a potentially duplicate record";
cancel submit;
}