Hi;<br>I have the following code:<br><br> try:<br> trueVal = form.getlist(storeColNames[i])<br> colNames.append(storeColNames[i])<br> if len(trueVal) > 1:<br> trueVal = string.join(trueVal, ',')<br>
values.append(trueVal)<br> elif len(trueVal) == 1:<br> print storeColNames[i], trueVal, '<br />'<br> trueVal = '%s' % trueVal[0]<br> values.append(trueVal)<br>
if len(trueVal) > 0:<br> sql = '%s="%s"' % (storeColNames[i], trueVal)<br> sqlUpdate.append(sql)<br> except:<br> raise<br><br>This works fine except when storeColNames[i] returns no data. Now, if I were dealing with getfirst instead of getlist, I could easily put in a nonsense default data value such as '%$#' and check for that. But how can I do that or something similar (and preferably more elegant) with getlist, which takes only the one name parameter?<br>
TIA,<br>beno<br>