What is the issue? Please be detailed.
I am asking respondents for the email address using a text question type. I want to ensure that this email address will match one already stored in our database (i.e. the emails we are sending the form to). How can I constrain the text answer such that it must match one of the emails in the attached emails.csv
file?
I understand that essentially I am creating a select_one
question, but I don't want to do this because I don't want respondents to be able to see all the other email due to privacy concerns.
What have you tried to fix the issue?
I am new to odk, and haven't found documentation on this specific issue. ChatGPT suggested a constraint: not(string-length(pulldata('alumni_emails', 'email', 'email', ${A101}))) = 0
. When tested, this did not exclude anything I typed into the box, either correct or incorrect email addresses.
I also understand from getodk.org support that since my database is only 500 emails, I could use the instance('list_name')/root/item[filter expression]/desired_property
format instead of `pull_data', but I've not found help on using this format as a constraint - just as a note or calculation.
Many thanks for your help in advance.