Detecting duplicate information and displaying a warning message

Hello everyone, I want to ask you something about our project.

Inside our project , to register a person to an activity, we collect the id of that person and the id of the activity he participated in. However, when doing this, I want to show a warning message to end users if this participant has previously participated in an activity with the same activityid . Or how many times has this Id repeated inside this form? is it possible? Please also find a picture froım our participation form attached.

@anilgnydn, are you trying to do this without a pulldata function or the dynamic data attachment feature?

I’m already using dynamic data attachment feature for bringing other information from parent project but the ids I want to check are inside the child project. @Kal_Lam