Conditional Page Break after Subform

Avatar

Avatar
Validate 1
Level 1
punit-khatri
Level 1

Likes

0 likes

Total Posts

17 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 1
View profile

Avatar
Validate 1
Level 1
punit-khatri
Level 1

Likes

0 likes

Total Posts

17 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 1
View profile
punit-khatri
Level 1

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)

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
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)

Avatar

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile

Avatar
Coach
MVP
radzmar
MVP

Likes

397 likes

Total Posts

2,687 posts

Correct reply

492 solutions
Top badges earned
Coach
Ignite 3
Ignite 1
Validate 1
Give Back 50
View profile
radzmar
MVP

11-05-2020

Change the scriping language to JavaScript.

radzmar_0-1589194985119.png