Oct-03-2023, 05:48 PM
(Oct-03-2023, 05:05 PM)deanhystad Wrote:rtQuote:table_rows = result is not working. throwing error.Guess you need to figure out why.
This is the code you had:
for result in results: table_rows.append(list(result))This worked, but items kept getting added on to the table instead of the table being reset to show the new items.
This didn't work:
table_rows = resultI think result was a typo, and I meant "results".
But results is probably not what we want either, because results contains multiple result, and result needed to be converted to a list to work. So somehow you need to reset table_rows to be empty, then call your for loop to add on the new rows.
As the result coming as tuple, I had to convert it to a list and it worked with comprehension.
Also the table I am taking the -TABLE- from the event and it is working as expected.