IF ELSE IF statement repeating twice

Hi, Sagar.

I recommend that you first confirm that the 2nd bar code has a different value than the 1st bar code. To check the two values, you could insert:

console.log("itemObj1.productBcid = " + itemObj1.productBcid);

immediately before the following line:

  if ($w('#an1').value === "") {

and then check the (Developer Tools) console after running your code.

HTH,

Art Bergquist