Better Solution for Duplicate Check?

Morning, all! 

I'm working on internal testing for my hospital rounding app, and while most is working as it needs to, I came across an interesting (at least to me) problem this morning.

I couldn't think of much of a way to perform a test for duplicated patients when entering a new patient in the app, so i created a field call "duplicate check" with a formula to create the value in that field:

CONCATENATE(LOWER([Last Name]),LOWER([First Name]),[DOB])

 
For the validity check, i have this:

NOT(
	IN(
  	[_this],
    	SELECT(
      	Patients[_duplicatecheck],
        ([_THISROW].[_RowNumber]<>[_RowNumber]))))

The issue i am having is, I needed to edit a record this morning and append a middle name for a patient, as that information was not available in the information i initially had. It failed, though, and gave me the error message
A duplicate patient exists. Please verify the information entered.

How can I adjust my validity check to make sure that I can edit an existing patient and bypass the check?

Solved Solved
0 14 501
1 ACCEPTED SOLUTION

You can take a look at this post:

Different Valid_If for Adds and Edits - Google Cloud Community

Also you can vote on this idea:

Different Valid_If for each case: Add new record t... - Google Cloud Community

The workaround is an IF() so that the validity rule is applied only if the row of the form is not in the database

View solution in original post

14 REPLIES 14
Top Labels in this Space