ExternalError: TypeError: Cannot read properties of undefined (reading 'now') at FTR, line undefined

All,

I’m getting an error message stating " ExternalError: TypeError: Cannot read properties of undefined (reading 'now')

  • at FTR, line undefined

"

This happens when I click my submit button to save data to a table. If someone could assist with this it would be greatly appreciated. I am very new to anvil so I apologize in advance.

from ._anvil_designer import FTRTemplate
from anvil import *
import anvil.server
import anvil.tables as tables
import anvil.tables.query as q
from anvil.tables import app_tables

class FTR(FTRTemplate):
def init(self, **properties):
# Set Form properties and Data Bindings.
self.init_components(**properties)

# Any code you write here will run before the form opens.

def button_1_click(self, **event_args):
Date= self.date_box
Shift= self.shift_box

anvil.server.call('add_FTR', Date, Shift)
Notification('The Furnace Tapping Report was submitted.')
self.clear_inputs()

def clear_inputs(self):
self.date_box=“”
self.shift_box=“”

Welcome to the forum!

I don’t know exactly what those are, but I’d imagine that they are Anvil UI components. You have to use properties of the components to get the contents. Start at Anvil Docs | Basic Components and then click on the properties of the component in use. One of those will get you the contents of what the user entered.

1 Like