How can one add a condition to a 'Pulldata' in xls such that what is pulled is not empty

How can one put a condition in pull data in xls like if field generates blank then it should ask to fill correct id .
I what a suituation where only the matching id correponds to the id on the media stored in csv.
I dont what where fields are pulled empty.
Any empty fields should be flagged as error, to prevent user entering wrong id.

I am having issue with this…

Thank you.

@chiabotu, maybe you could manipulate and design your xlsform as discussed previously:

Or you could also add a constraint in the question that takes the code which matches the pulldata function as shown in the image shared below:

In the survey tab of your XLSForm:

CSV File:

image

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

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

Reference xlsform:

Pull Data (Constraint).xls (33.5 KB)

Reference CSV File:

Codes.csv (249 Bytes)

Thank @Kal_Lam , for your quick response.
I shall implement the second approach.Although this not what i want.

The first approach does not fall within my need
It checks whatever the user as entered into the first textbox matches the second input text field.

However, is there a way to stop empty fields be returned should one use wrong alphanumeric code as the id.

Example.The second illustration used a number constraint to validate input field,but what if the matching id isnt it a whole number but a alphanumeric character.
Say the id is 2017CJK …

Although regex can be used as a means of valdation.Users can still enter any alphanumeric codes that still fall within the valdation rule,thereby making nonsense of the rule.The result is empty records been entered in the kobotool table.
What exactly i want,is whenever any empty field returned as a result of wrong alphumeric id entered in the textbox , there should be a c
heck to instruct the user to go back and fill correct alphanumeric id.

check	The information pulled above (groupname) is not empty	${groupname} != "	

How can i do this ?

Thank you n love the team contributions towards taking kobotool to commanding heights of excellence…

Thank @Kal_Lam , for your quick response.
I shall implement the second approach.Although this not what i want.

The first approach does not fall within my need
It checks whatever the user as entered into the first textbox matches the second input text field.

However, is there a way to stop empty fields be returned should one use wrong alphanumeric code as the id.

Example.The second illustration used a number constraint to validate input field,but what if the matching id isnt it a whole number but a alphanumeric character.
Say the id is 2017CJK …

Although regex can be used as a means of valdation.Users can still enter any alphanumeric codes that still fall within the valdation rule,thereby making nonsense of the rule.The result is empty records been entered in the kobotool table.
What exactly i want,is whenever any empty field returned as a result of wrong alphumeric id entered in the textbox , there should be a c
heck to instruct the user to go back and fill correct alphanumeric id.

check	The information pulled above (groupname) is not empty	${groupname} != "	

How can i do this ?

Thank you n love the team contributions towards taking kobotool to commanding heights of excellence…