I followed all the steps on this page to minimize duplication when data entries register new beneficiaries : Minimize Duplicates Method 2: Validating from a Label - CommCare Public - CommCare Public
this method was working for a while with me, but later stopped alerting data entries about the duplication, i tried all my best to check why it is not working i didn`t find a solution until lately i figured this message on the website : ( Warning!
Please note the following limitations:
1- Troubleshooting for this method is not actively supported by the CommCare Support Team.
2- You must test this feature on mobile, not app preview or web apps. ).
any help or support from your side, i would be appreciate it.
thanks,
Mohammed
thanks for your reply, dear i followed all the steps in the link provided, what i have is name as text field and date as date of birth after the user enters the name and the date of birth, another label after them will be affected checking the duplication if there is any, the function that is written in the label`s validation condition is: ( count(instance('casedb')/casedb/case[@case_type = 'distribution'][last_name = #form/name][date_of_birth = #form/date_of_birth]) = 0 ).
that expression looks like it will return a true when you DON'T have a duplicate.
you're counting the cases, and it will then return true when the count is 0. i think, with that expression, when the count is > 0, you should return "true"
that might be it.
are you getting that label when you're entering a new beneficiary that doesn't have duplicates?
Mazz's interpretation sounds right. The label as written now will appear when the count = 0, which aligns with your description of appearing for new beneficiaries. Switching from an '=' sign to a '>' sign should make the label appear only for duplicate entries instead.