How to validate a correct password with the pull data function to proceed with the survey

Hi Kalam,

Very Good Evening

I have a query regarding the validating users credential check to proceed forward while starting the data collection/interview.

I have to two initial questions : i.e.
Select your user name : Interviewer/Data Collector will select his/her name
Type your password : Interviewer/Data Collector should type the password provided to them (since password/credential for users are unique)… for example I have given in the attached xls file : choice sheet pword column for respective user.

Now I have written validation logic on constraint column : (${user}=11 and ${pass}=1234) or (${user}=12 and ${pass}=5678) or (${user}=13 and ${pass}=9012) or (${user}=14 and ${pass}=3456)

It works fine, but now I want to directly lookup credential from choice sheet given pword for respective user and validate the credential for specific user to proceed forward, rather using the above syntax line I would like to use looking up value from the above said sheet choice on pword field… So I have tried to write in constraint column (${user}=name and ${pass}=pword) … but it does not work.

for your reference I have attached here the xls file which has been used for KoboCollect form designing…

Looking forward to hearing solution from you.

Thanks & Regards,
Ramesh Pradhan
GCS-2022.xlsx (20.5 KB)

@rameshpradhan, so you mean you wish to constrain an enumerator's name that is a select one question type with password that is also a select one question type?

Hi Kalam,

User name will have select one option, then after on password User have to enter the password (integer/text)… once password is entered by user it has to check with the xlsform data in choice sheet… pword field… for respective user, once it is true then only proceed forward for further interview…

With Best Regards,
Ramesh

@rameshpradhan, the second step you intend to do is an added step already covered in the first step. So why do you wish to go for the second step when the first step already fulfills the constraint?

Hi Kalam,

Yes If I write the first step of validation it works fine, but my concern is in my project there will be more than 4 users ie. upto 100 users based on project volume of sample so I would automate it from the choice list with specific users password to be verified from the xlsform (choice sheet… pword column) rather writing unlimited users password/credential check individually.

Thats why I am trying automate validity check fromn backend data.

Hope I have explained you rightly what I am looking for.

If it is possible in KoboToolboxCollect it would be big achievement for us.

Thanks and Regards,
Ramesh

So, the general question is: How can a choice_list be used to get further values (columns) for a named item?
Can e.g. pulldata or a XPath syntax be used here?

1 Like

Hi Kalam & Wroos,

Yes I need a syntax to be used for respective users tracing code, pword to be validated for further move?

Thanks and Regards,
Ramesh

@rameshpradhan, maybe you could do it as outlined in the image shared below:

In the survey tab of your XLSForm:

The CSV file:

Image 2

Data entry screen as seen in Enketo: when a wrong password is entered

Data entry screen as seen in Enketo: when a correct password is entered

Reference XLSForm:

Pull Data (Check Password to Proceed Survey).xls (29 KB)

Reference CSV File:

Codes.csv (136 Bytes)

1 Like

Thank You So much Kalam

With Best Regards,
Ramesh

1 Like