Filter appears to be a sub-string match rather then the exact match

I have a field that asks for Gender
When I filter by ‘Female’ or ‘Other’ the filter works correctly.
However, when I filter for ‘Male’, the filter returns all ‘Male’ and ‘Female’ rows.

My suspicion is that it is because male is a substring of female.

The filters should be searching by an option variable ideally, especially for ‘Select One’ or ‘Select Many’ questions but if you must do them by string matching, then it should be an exact match in these cases.

1 Like

Hi @Sceptre,

Thank you for flagging this issue in the community (and expecting the same in upcoming days as well)! Just made a check and was able to replicate the issue at my end.

In the survey tab of your xlsform:
Image 1

In the choices tab of your xlsform:
Image 2

Filtering male choice (where sex variable coded in number) from DATA>Table:


Remarks: Has no issue.

Filtering female choice (where sex variable coded in number) from DATA>Table:


Remarks: Has no issue.

Filtering female choice (where sex variable coded in text) from DATA>Table:


Remarks: Has no issue.

Filtering male choice (where sex variable coded in text) from DATA>Table:


Remarks: Here is the issue. When you try to filter a choice whose names are coded in text.

Reference xlsform:
Filter Test (View Table Data) 2020 09 15.xlsx (11.0 KB)

FYI, please be informed that i have created a GitHub issue for this and it can be followed here:

Have a great day!

1 Like

Hello @Kal_Lam thank you for your answers.I’m facing with the same problem. Codding with numbers solves the problem but there are thousands of data already entered coding with numbers affects only the new data to be entered, what will be the past data. Thanks.

Hi @anilgnydn
The previous data will remain in the data structure that they were collected i.e. if text then they would be text. However, you have to select the option of download from all the previous versions of deployed forms.

Stephane

1 Like

Hi @stephanealoo Thank you for your answer.

1 Like