I have SharePoint Server 2016 on premise. I need to prevent duplicate values based on two columns. I've referenced this article: https://www.codeproject.com/Tips/1205585/Unique-Entries-Based-on-Multiple-Columns-in-Sharep. However, my code does not consistently work. Please refer to my code: 188165-testcode.txt
In the console.log, I can see the records returned from my list. However, it also displays, 153 undefined undefined. I assume all records are not returning and therefore showing as undefined. As a result, if I enter data in my list, the record will still save even though it already exists in the list. What's missing?