Match user input with db for uploading files.Not email.

i have a database where someone can upload documents.
There are four user input fields. I want to check the three fields with db. If three are same with db the already uploaded message should show. all three are not same they can upload. IM NEW TO WIX.PLS HELP


Comparing each field using an if statement after filtering the database via a query is redundant. You can just check if a value greater than 0 has been returned:

if(results.items.length > 0) {
      $w("#text15").show();; //see item below

If you are trying to compare the results of the returned item from the collection here is the proper way to do so:

if (results.items[0].class === $w("#dropdown1").value && results.items[0].division === $w("#dropdown2").value && results.items[0].subject === $w("#dropdown3").value) {

Good luck!

Not Working