How to use Count for a check list to prevent Duplication?

Hi! I would like to know how to verify for duplication agaisnt a list.

I will have a standard list of items:

e.g Apple, banana, Strawberry, Mango

If the user were to key in once, the process will continue normally.

However, if the user keys in Mango again, there will be another process.

I’m not sure how to code the count part.

Please help, thank you.

Hi,

The following sample may help you.

listUserInput.Where(Function(s) s=res).Count>1

Sample
Sample20250106-1.zip (2.9 KB)

Regards,