Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

Help with form referencing instanced subforms

camilot95966368
Level 2
Level 2

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

1 Reply
_Bruce_Robertson
Level 10
Level 10

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