- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hi,
All objects have an instance number, which is zero-based. When scripting general objects you do not need to worry about the instance, as there is only one object, "Customer".
However with repeating objects, the instance number becomes more relevant. The instance number is in square brackets after the repeating object's name.
If we say that the invoice is on "page1", which is the repeating object and "Customer" is an objects on page1. You can reference each instance of the invoices by using "page1[0]", "page1[1]", "page1[2]", etc.
In your case the "Customer" object is not repeating. It is the "page1" object that is repeating. Therefore to access specific "Customer" objects on diferent pages, you would need:
"page1[0].Customer"
"page1[1].Customer"
"page1[2].Customer"
"page1[3].Customer"
etc.
Note that when scripting in JavaScript you would need to resolve this node:
this.rawValue = xfa.resolveNode("page1[0].Customer").rawValue; If you want the schedule to gather information from each instance of the invoice page, then you could either set up a loop or have an if statement checking if each instance exists. The route would depend on if you are going to limit the number of invoices that can be added (say max. = 10) or if the user can add an unlimited number of instances (in which case the schedule is also unlimited).
In either case you are getting into a bit of more involved scripting. Are you happy with this?
Niall
Views
Replies
Total Likes