I am trying to implement a longitudinal survey that respondents will access from their mobile phone (in an application that I have written). I would like a unique user ID so that I can link submissions that come from the same respondent, but I do not want this to contain any personal information. Ideally this would simply be a random UUID generated on the phone. Is there a way for me to insert such an ID into the form through a webview?
Alternatively is it possible to collect a hashed value of the userβs imei code? For example, could I use deviceid in the XLSForm but then hash it and collect only the hashed value?
Thanks, I am planning to use this in a mobile phone application that will run on both Android and iOS. My idea is to let users access the survey through a webview and I want to the survey to collect a unique identifier for each user that does not contain personal information.
I have just been experimenting with the digest function (https://docs.getodk.org/form-operators-functions/#utility). My idea was to have a deviceid field and then calculate the hash of this. But I am getting an error when I try to use digest:
FormLogicError: Could not evaluate: digest( /model/instance[1]/data/this_deviceid , SHA-256, base64), message: Function "{}digest" does not exist.
Would you mind sharing your xlsform with the community (deleting all the other variables and keeping only the required variables) so that we could have a look at our end and see if we could provide any inputs.