Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Updating database with expandable table

$
0
0

Hi All,

 

I’ve designed a simple time sheet for our work, the worker basically fills out their name, week ending, then goes to a table with date picker, the hour started and finished. The next field automatically calculates their hours and overtime if it applies. There are also text fields to describe the job location and description.

I then have a button to add a row to make another entry, because they may be half day at one job and half day at another. They can continue to add rows until they have filled out the whole week’s work.

I have the form connected to an access database with each field in the row bound; an update button to update the new record that was inserted into the database when the form was opened using this scripted in form1 form:ready:

 

xfa.sourceSet.DataConnection.addNew()

 

When the user enters one entry and updates, this works perfectly.
When the user clicks to add a new row, the new row contains the data of the first row and when you change one, it changes the other.
When I set the data bindings to incorporate the [*] wildcard, then the new row is empty.
Before:
$record.DataConnection.Start
After:
$record.DataConnection.Start[*]

 

The problem that I’m running across now is that the update button will only update the info in row[1] and not add the info in row[2].
I set the following command on the click event for when the table has a new row added:


xfa.sourceSet.DataConnection.addNew()

 

but this didn’t work.
I’m kinda at a loss now what to do, all I need is for the form to be able to add multiple records to the database with one button without having to open it and add each entry separtately.
Does LiveCycle support multiple fields with the same name in a dataconnection?
Eg. Hours[1]
Hours[2]

I've attached the form for viewing

Thanks in advance!
Justin


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>