Dynamic Tables and Data Service

Avatar

Avatar

xrum

Avatar

xrum

xrum

03-09-2008

hi 🙂



i have a dynamic table (with add/delete row) buttons,



one of the fields in each row, needs to populate the rest of the fields with first/last/address information.



i understand how the data service works for a single fields, is there a way to do this by adding/deleting rows?



how can i bind them? and how do i ensure that the proper row is populating?



Thanks!

Replies

Avatar

Avatar

pguerett

Avatar

pguerett

pguerett

03-09-2008

To get the instance of the subform that you are working on you can use this.parent.index. Now when addressing the field the occurance number is on the container subform and not on the field itself. So if you had a Page1 - Subform1 - Row - Object you would use Page1.Subform1.Row[instancenumber].object.rawValue



The only issue is the the [] are illegal in javascript so you can use the syntax:



xfa.resolveNode("Page1.Subform1.Row[" + this.parent.index + "]").object.rawValue



Make sense?

Avatar

Avatar

xrum

Avatar

xrum

xrum

03-09-2008

hey, thanks! i understand how to get the rawData, but how do i bind it to the data service, to pre populate?

Avatar

Avatar

pguerett

Avatar

pguerett

pguerett

03-09-2008

In the binding tab you can click on the repeat subforms for multiple data items.

Avatar

Avatar

xrum

Avatar

xrum

xrum

03-09-2008

but do i need different invokeButtons for each row? and if so, how do i bind them to each fields, in each row?

Avatar

Avatar

xrum

Avatar

xrum

xrum

03-09-2008

what happening now is this.



when i enter a user id in the first row, it populates fine. then i add an instance to my table, and a second row comes up. When i enter a user ID into the second row, it updates the user information in both the first and the second rows, not just the second row....