You can make a copy of my Custom Forms concept App. It shows how to prevent duplicates. It’s a Classic App, but the technique is basically the same.