OL Learn

Adding a second condition

Good day,

I have Planetpress talk that specify this condition:


A showpage command is issued and a second page is created. If there is a line 35, everything works ok but if the &iNbLignesAffichees ends at 34, a blank page is generated.

How can I add a second condition to the if statement that will prevent a second page being created?

Tx for your help


if(&iNbLignesAffichees >= 34)

I guess that in case of 35, the next page has 1 line on it? If you want to have max 34 lines then your condition should be

if(&iNbLignesAffichees > 34)

Tx for your response Hamelj,

I had already tried that.

If I have 34 lines but not a 35th, a new page is being generated but the page is empty.

I run a page planetpress before, I have created a variable &iLastOne which gets populated with ‘REMOVE PAGE’ when it reaches the end of my data.

I would like an additional condition to stop the creation of the extra page if the &iLastOne=‘REMOVE PAGE’

if(&iNbLignesAffichees >= 34) and &iLastOne<>‘REMOVE PAGE’


What is the actual maximum of line you want in a page?

34 is fine as the number of lines before creating a new page.

Then I stand with my 2nd previous answer. You condition should be if(&iNbLignesAffichees > 34). when it is true, you then do your showpage(). If it isn’t, no page is added and you let the normal showpage of the form page be executed.

This is what I am getting with if(&iNbLignesAffichees > 34)

I can’t upload pdf here. I have placed a pdf on my gdisk.

Please upload an anynomized version of your form (sensitive data removed) and any needed resources required to reproduce the behavior.

In the mean time, please copy and paste the comlete PressTalk script that seems to be the probem.

Sorry Hmelj,

I am getting the message

Sorry, new users can not upload attachments.

I don’t know how long it takes for my “new status” to disappear.


Sent you a private message with my email. Once I have figured it out, I will post my findings here for other to see.

I haven’t went though all of the code yet but right of the bat, on line 12 of the PressTalk1_bk PressTalk object, you increment the value of &iNbLignesAffichees by one when you set its starting value to 1 on line 2.

So right away, your &iNbLignesAffichees is set to 2 without having shown anything. Then you do the same at line 23, after you actually have shown a text line.

The fact that it causes an issue at datapage 692 is probably because it is the first page which has exactly 34 lines.

Can you confirm that it is the source of the issue? I would initialize your &iNbLignesAffichees variable to 0, on line 2, and nothing else need be changed.

I have tried the suggested modification on line 2. &iNbLignesAffichees:=0, ran the preview again and I am still getting the extra blank page on datapage 692.


I have replied to your email with the form you sent me with the change I proposed. it works for me on page datapage 692.

Let’s continue in the forum for exchange:

last email exchange:

hamelj: Here the form with the change I specified and it works for me.
sveyharling: Hello,

I opened and ran the pp7 returned. While datapage 692 is working correctly, datapage 691 is now creating an extra blank page.

hamelj: 691 works for me

Now that is up to date, what version of PPSuite do you use?

Tx for the latest pp7 JCH. I have ran it as is on my computer.

Datapage 692 extracted from created pdf and saved to:

I am still getting the same extra page generated. Is there any software settings on my software installation that would cause that? I have PlanetPress Design Version


Then that must be it. Update to the latest version which is, which is the final version for it. Because the form I sent you works fine for me.

I’ve contacted my It dept to get the updated version installed on my station.

I will let you know after trying again.


Good day JCHamel,

IT installed the latest version but I am still experiencing the same issue on datapage 692samples692.pdf (255.5 KB)

Which other setting(s) might cause the discrepancy?

At this point, you should open a ticket via our website so a technician can remote at your site and see what the issue is.

I also suggest you report here what was the issue to share with other users