Searching names through odk-x-survey or through odk-x tables

One technique I use is to combine the first and last name and then do a database query by adding the queries tab to the XLSX definition:

SELECTION COLUMN: _savepoint_type = ? and (REPLACE(first_last_name, " ", “”) LIKE REPLACE(?, " ", “”)) and ( substr(birth_date,0,10) = substr(?,0,10)) and is_adult = ? and _id != ?

SELECTIONARGS COLUMN: [‘COMPLETE’,data(‘first_last_name’), odkCommon.toOdkTimeStampFromDate(data(‘birth_date’)),‘yes’,metadata(‘_id’)]

If query finds someone with a similar name and same birth date the system reports the problem.

I use the REPLACE to strip out spaces to improve match quality.

1 Like