Hello team,
Am looking for a way to search names using names in odk-x survey or odk-x tables
Anyone who can help?
I know I have asked this before
and
Does someone has a code or away to do this
I really need help on this.
Please share If you have way out
See this post:
the HOPE example app has search, but definitely it requires a lot of coding to modify.
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