Expand my Community achievements bar.

SOLVED

Conditional Break if Object on Page One after layout

Avatar

Level 4

I require the conditional expression to check if an object is on page one after layout and if so to break next at the top of the next page.

 

Here is where I have run into the problem, I have tried the following code, which, is not working:

 

LucreciousDFF_0-1624809292136.png

The code may also require the relayout code after checking the placement of the object.

The reason for this is that this object under rare conditions will flow onto to page and using the normal page break it results in the object being the only one on the second page.

 

Any suggestions will be welcome.

 

I have previously posted the question here: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager-forms/simple-conditional-b...

 

However, there was most likely a lack of clarity at the outset.

 

Thank you in advance.

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi again @LucreciousDFF,

it may not be the most strategic approach to open another question on a topic that was difficult to understand in the first place. Your description here did not help

What you are trying to achieve will not work in the way you show in the screenshot. Pagination is event driven. The logic you try here asks it to paginate when the object is on page 1 - that cannot work because this is not an event but a situation. And you cannot relayout() in the conditional break - this is purely a true false thing which will decide when to break or not...

 

That is why I am asking you many questions or even requested that you PM me some XDP or screenshots so that I can understand what you are trying to do. My first solution attempt was obviously wrong.

Kosta

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

Hi again @LucreciousDFF,

it may not be the most strategic approach to open another question on a topic that was difficult to understand in the first place. Your description here did not help

What you are trying to achieve will not work in the way you show in the screenshot. Pagination is event driven. The logic you try here asks it to paginate when the object is on page 1 - that cannot work because this is not an event but a situation. And you cannot relayout() in the conditional break - this is purely a true false thing which will decide when to break or not...

 

That is why I am asking you many questions or even requested that you PM me some XDP or screenshots so that I can understand what you are trying to do. My first solution attempt was obviously wrong.

Kosta