What I’m trying to do:
Problem:
Our screen is input screen, which writes several values as selected using drop-downs (as shown Fig2).
The values in dropdowns are loaded from tables (as shown in Fig1), after loading and inserting the data we are trying to clear the input for next fresh-screen, however we get a in the screen after successful insertion of data. Here we expecting an empty label for client_code.
We do have many dropdowns like this in our application, we would like to clear the inputs after successful insertion of data to external-database.
What I’ve tried and what’s not working:
Code Sample:
# load the dropdown values for client_code
self.client_code_dd.items = [(r['client_code'], r) for r in app_tables.client_names.search()]
# insert data to table (external database)
anvil.server.call(
'insert_data',
self.text_box_id.text,
self.client_code_dd.selected_value["client_code"]
)
# clear inputs
self.client_code_dd.selected_value = None,
# this is a formatted code snippet.
# paste your code between ```
Screen-Shots attached:
Clone link:
share a copy of your app