Jump to content

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

Recommended Posts

Posted

Maybe I'm going about this the wrong way:

I have a Student Database that stores name and address information. Each student, ideally, has a unique SSN as an identifier. Unfortunately, not all students provide a SSN.

For any student that doesn't provide a SSN, I want to check to see if the student exists in the database. I store the first and last names separately as StuFirstName and StuLastName, respectively. I want to use the field Whole_Name to add StuFirstName and StuLastName, and ensure the sum is unique with the Field Validation option.

I've been using:

Field: Whole_Name, Auto-Enter Calculation: (StuFirstName & StuLastName), Do not evaluate if all fields are empty

Validation: Unique

Display Custom Message: "This Name Already Exists"

The field order is StuLastName, StuFirstName. The calculation should be performed after data is entered in StuFirstName. The problem is that when I enter data in StuLastName, the result is calculated and only data from StuLastName is auto-entered.

What have I missed? Should I be using concatenation at all?

Thanks

Posted

It looks like you're using a text field, try making it a Calculated field using the same calculation of StuFirstName & StuLastName.

Make sure you go to the Storage Options and check the box Do Not Store Calculation Results. This way it will update when the names are changed.

HTH

Posted

You're on the right track. Try this:

Make Whole_Name an indexed calculation = StuFirstName & " " & StuLastName

Make a self-join relationship, say, "Self|Matching_Name", matching Whole_Name to Whole_Name

Make the validation for StuFirstName and StuLastName:

= Count(Self|Matching_Name::Whole_Name) = 0

Hope this helps!

Posted

Thanks! This is the validation I was aiming for!

This approach lends itslef well to my next hurdle: Using If... End If to hopefully display any matching records.

This topic is 8251 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.