Can username (enumerators name) be used to drive logic (skipping)

I would like to include a flag in usernames I set up for field staff so that those with a certain leading letter will not see a certain question. Is that possible? So user ID 0001, 0002, 00120 etc. all get the question, but user ID E0001, E0002, E0003 etc. have a skip on that question. Basically if username includes ā€œEā€ then skip question.

Is it possible?

Hi @timcthefilmguy,

You could design this as outlined in the images below:

In the survey tab of your xlsform:

In the choices tab of your xlsform:

Image 2

Data entry screen as seen in Enketo:

Data entry screen as seen in Enketo:

Reference xlsform:

Skipping 2020 07 24.xlsx (10.8 KB)

You could learn more on how to skip a question by following our support article Adding Skip Logic to Your Form.

Have a great day!

Hello,
In addition to Kal_Lam. Esp. If the enumerator ID is a free text field (instead of a select_one) you could use the string function contains (ā€¦) in a relevant clause. See https://docs.getodk.org/form-operators-functions/#searching-and-matching-strings

2 Likes