Im writing an app, that is supposed to store outputs as a string in a datatable and then ask the ones that have entered them to check up to two boxes to further define the information. The outputs are matched using the email address that respondents need to enter on the first page. If a respondent only entered one input, the check boxes are checked and the information makes its way into the data table.
However, if there are two or more outputs given and I check the boxes, then I get this error:
anvil.tables.TableError: More than one row matched this query
My function for the boxes looks as follows, it looks the same for both check boxes and only the respective column names differ:
def check_box_1_change(self, **event_args):
"""This method is called when this checkbox is checked or unchecked"""
check_row = app_tables.responses.get(email=Globals.mail)
#check_row = check_row['output']
#print(check_row)
if check_row['Energie'] == True:
check_row['Energie']=False
else:
check_row['Energie']=True
I guess I need to specify the output in the function but also get an error when trying this…
Please find attached a clone of my project: