Expand my Community achievements bar.

Unique Numbering/Add Subforms

Avatar

Level 4

Can you tell me if this is possible to do in LC Designer 7.1.

I have a form that is 8.5 x 5.5 and there are two of these forms on a 8.5 x 11 page.  On each form there is a unique number and it is numbered consecutively, however, the numbering is offset by the number of copies needed.  For instance, if I need 200 forms, the number on form 1 would be 001 and on the same page, form 2 would be number 101.  The next page would be 002 for form 1 and 102 for form 2 and so on.

I want to be able to enter a starting number into a field and enter a quantity into another field.  The starting number will be the number on form 1 and the quantity will trigger the amount of forms needed - in the order I described above.

Attached is a rough sample.

If this is at all possible, I would appreciate the help.

Thanks!

3 Replies

Avatar

Level 6

Wow.  I'm no programmer but I've been researching this.  With no responses, there maybe no solution.  There is a script to count the # of instances of adding a subform:

BodyPage1.RepeatingSubform.instanceManager.count

Also a script to add page numbers:

this.rawValue = xfa.layout.page(this);

But I don't think that will serve your purpose.  I'm playing with these to see if it can work.

Avatar

Level 4

I found a script that worked with the Quantity field (see below), however, I'm still stumped on how to do the unique numbering.

var numField = this.rawValue;

var count = xfa.form.SF0273.Ticket.Page1.Form1.all.length

var t;

var r=0;

if(count > 1){

for(t = 0; t < count-1; t++){

xfa.form.SF0273.Ticket.Page1.Form1.instanceManager.removeInstance(1);

}

}

for(t = 0; t<=numField -2; t++){

xfa.form.SF0273.Ticket.Page1.Form1.instanceManager.addInstance(1);

}

Thanks for your response and help.

Avatar

Level 6

I haven't given up.  Posted this elsewhere in hopes of a solution.  I'm

thinking it can be done.