July 3, 200421 yr How can you make sure the data of a field is in a certain format based on another field? I have 2 fields: "Company" and "Employee ID". If Company=1, then the employee ID must begin with 3 letters. If the Company=2, then the employee ID must have 9-10 digits and end with one letter. Is there a way to specify the "Employee ID" field to make sure that the correct data is put in based on the "Company" field? Any help would be greatly appreciated. Thank you!
July 6, 200421 yr Validate using Choose( Company - 1; Length(Filter( Upper(Left( Employee ID; 3 )); "ABCDEFGHIJKLMNOPQRSTUVWXYZ" )) = 3; PatternCount( " 9 10 "; " " & Length(Employee ID) & " " ) and not GetAsNumber(Substitute( Right( EmployeeID; 1 ); 0; 1 )) )
Create an account or sign in to comment