Conditional Page Break after Subform

punitk81275354

06-04-2020

I have two subforms. i  have show and hide subform accoriding to some condition.

Layout should be based on condition as below. lets assume x is a condition

1.  x is true then show the subform1 and subform2 should show start from second page.

2. x is false then hide the subform1 and subform2 should show on first page.

 

so requirement is  if x is true then i need compulsory page break after subform1.

 

Please suggest.

 

Thanks in advance

 

Accepted Solutions (1)

Accepted Solutions (1)

radzmar

MVP

08-04-2020

Ok, given you subforms are childs of a body page or subform named "Page", you can add this JavaScript into the contidional break dialog of subform2.

 

// If this subform is not the first visible under "Page", create a page break.
Page.resolveNodes('#subform.[$.presence eq "visible"]').item(0).name !== this.name

radzmar_0-1586357252257.png

 

Hope this helps!

Answers (1)

Answers (1)

radzmar

MVP

11-05-2020

Change the scriping language to JavaScript.

radzmar_0-1589194985119.png