Help with form referencing instanced subforms

Avatar

Avatar

camilot95966368

Avatar

camilot95966368

camilot95966368

05-06-2017

Hello,

I'm sort of new to livecycle and I'm trying to have a form that references subform instances in a different page and I've tried for hours to resolve with no avail.

This is the code that I'm using:

lessee = "";

for (var i = 1 ; i < 7; i++) {

var lesseeno = Checklist.Fields.Lessees.resolveNode("spLessee[" + i.toString() + "]").Lessee;     

var firstname = lesseeno.FirstName.rawValue != null ? lesseeno.FirstName.rawValue : "";   

var middle  =  lesseeno.Middle.rawValue != null ? lesseeno.Middle.rawValue : ""; 

var lastname = lesseeno.LastName.rawValue != null ? lesseeno.LastName.rawValue != null : "";

var busname = lesseeno.BusinessName.rawValue != null ? lesseeno.BusinessName.rawValue != null : "";

lessee  += firstname  + " " +middle+" "+ lastname + ", " ;

}

this.resolveNode("$").rawValue  = lessee

Can you let me know what I should change?

Thanks,

Camilo

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar

_Bruce_Robertson

MVP

Total Posts

1.8K

Likes

268

Correct Answer

372

Avatar

_Bruce_Robertson

MVP

Total Posts

1.8K

Likes

268

Correct Answer

372
_Bruce_Robertson
MVP

06-06-2017

Hi Camilo,

Have you got exceptions turned on in Acrobat, under Edit ... Preferences ... JavaScript ... set "When exception is thrown" to break.

The lines assigning lastname and busname look strange as they are assigning a Boolean expression, you probably want to remove the second " != null " on that those lines.  Also seems a little strange to start from i = 1 (not zero).

Maybe try adding some app.alert() statements, like app.alert(lesseeno.somExpression) after you have set the value of lesseeno

Regards

Bruce