What I’m trying to do:
I am trying to update a cell in a particular row of Google Sheets, however wrongly the first row gets updated. I think this might be a bug (-:
Thanks to everyone who might find any mistake in my approach or maybe confirm that this really wrong (-:
PS:. Anvil is simply wonderful!
What I’ve tried and what’s not working:
I tried this via both the server and client access, but this does not seem to matter.
Please see my images below: In the shared app I am trying to update row no. 4 (a = ‘id’) to change cell of column b to the word update, but after passing the same row the column b, it updates the first row of the sheet.
See my code below.
I am listing all rows where the column ‘a’ contains the keyword ‘id’. And then I try to update the value of colum b in the same row (by passing the same row). However only the first row gets updated.
sheet = app_files.anvil_test worksheet = sheet['main'] # selects worskheet called main rows = ws.list_rows(a='id') # searches for rows containing 'id' in column 'a' for row in rows: print(row) # to check what the row actually represents row['b'] = 'update' # this should update the same row, cell column b, but in reality it updates the very first row.
the post has been edited for clarity