A while back somebody did:
self.myname = app_tables.people.add_row(Name=“Jane Smith”,
Age=7,
Employed=False)
somewhere in init:
self.friends = anvil.server.call(‘get_friend’)
self.mybestfriend = self.friend.search()
…i have a dropdown with some values…
self.best_friend_drop_down.items=app_table.find_people…(list of friends…)
self.drop_down.selected_item=self.mybestfriend…
…User selects a different one
self.drop_down_change(self, **event_args):
#How do I update my row…
#if I never selected anything I do:
if not self.mybestfriend:
self.friend.add_row(self.item(…))
else:
self.mybestfriend = newly selected item?
How exactly do I update the table…I see in docs, how to add_row, but that causes bestfriend to be added each time instead of replaced.
If I initated self.mybestfriend in init, when I try to update it in drop_down_change function I get
TypeError: ‘’ object is not callable
at Form1, line 83
I can’t seem to locate instructions on how to update linked row with new value.
update_row(Mybestfriend=self…?)?
Thanks
Lucas