Schleid Alex

Schleid Alex

  • NA
  • 361
  • 44k

Find item in a list

Mar 16 2021 7:25 AM
Hi,
 
I have a project where item should be added to a list but we want to prevent duplicates,  I have created a jquery function that add item to the list but I want to create a function that verifies that the item is not already in the list an call that function within my jquery add function.
My searchduplicate function will return true if duplicate is found and false otherwise. I want to use the returned in my addtolist function to wether add the item or show a "item is already in the list" error message.
 
Does this make sense? if yes please help design that.
 
Your help is appreciated.
 
Thank you!

Answers (4)