Jump to content

This topic is 7514 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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! confused.gif

Posted

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 )) )

This topic is 7514 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.