I’m uploading data in a table, at each line I’m verifying that the part number already exist in the table, if it does not I’m trying to save the part number to an array to display at the end of the upload.
My code is as follows:
NS_part = 
x = 0
path = fpmi.file.openFile(“csv”)
if path != None:
file = open(path, ‘r’)
for line in file.readlines(): data = line.split(",") if fpmi.db.runScalarQuery("SELECT part FROM test2 WHERE part = %s" % (data), "manufacturing") == data: WRITES THE RECORD else: NS_part = data fpmi.gui.messageBox("Part Number Not Found "+str(NS_part[x])) x=x+1
For part number I either get the number 4 or the number 8, any suggestions?