Validate multiple fields.

Validate multiple fields.

Hi,
Is it possible to validate multiple fields in a form to make sure that data is unique?  I want to count the records and if fields StarDate & Location & Employee are already present in that certain combination, Cancel form submission. 

Iif(count(WorkSched[StartDate=input.StartDate&Location=input.location & Employee_Name == input.Employee_Name])  >  0)
{
    alert (("StartDate, Location and Employee_name already exists"));
    cancel submit;
}

Thank you.