Form Question - txtField updating data collection.

I have created the form below. I want it so users can upload files to my data collection. Everything seems to be working with one exception; Filename in my collection is not being populated.

On this form txtFileName is connected to the FileName Column in my collection.

I have used the code:
export function UploadButton1_change(event, $w) { $w(‘#txtFileName’).value = $w(‘#uploadButton1’).value[0][‘name’] }

to get the filename the user selected from the “choose file” button and populate txtFileName (File Name textbox). When I preview the form and choose a file, the txtFileName box gets populated properly when a file is chosen. When I submit, all the data collection fields populate properly except FileName, which is blank. If I manually type something in the txtFileName box then submit, that data will populate Filename in the collection.

How do I get the value in txtFileName to populate in my database without the user having to enter the data?

Thanks

Hi,

Can you provide a link to your site so I may investigate further ?

Thanks,
Itay