def colUniqueValues(self): #Slot for getting unique values for the selected column self.lstUniqueVals.clear() selCols = self.lstQueryCols.selectedItems() if len(selCols) > 0: selCol = selCols[0] colName = selCol.text() uniqVals = unique_column_values(self.srcTab,colName) self.lstUniqueVals.addItems(uniqVals) self.lstUniqueVals.sortItems()
def fields_loadUniqueVals(self,tableName,columnName): #Get unique column values and load the list uniqueVals = unique_column_values(tableName,columnName) self.lstUniqVal.clear() self.lstUniqVal.addItems(uniqueVals) self.lstUniqVal.sortItems()