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

@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)