Help with form referencing instanced subforms

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

Mark Solution

Are these answers useful?
Help other community members by marking useful answers as accepted.

Accepted Solutions (0)

Answers (1)

Answers (1)

BR001
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