Duplication check with Dynamic data attachment

Hi all,
I am trying to build a project where I will register all of my beneficiaries who receives the services from my program. This is the form that will be used to register any beneficiaries
SRH & GBV Beneficiary Reach.xlsx (13.4 KB)
But, before I register a beneficiary, I want to check whether that specific beneficiary ever received any services from my program with the dynamic data attachment function. To do this I developed kobo tool:
Duplication Check.xlsx (9.6 KB)
But, I can’t deploy this form due to some error in this form. It shows this error notification

when try to deploy it. Can anyone please address my error kindly? Thanks in advance.

@tasfik_rukan, this has already been covered in the support article shared previously:

Maybe you will need to play around with the XLSForms shared in the article to better understand the syntax.