IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#20837 - 11/16/07 05:36 AM Check if page name valid
Chris_10 Offline
OL Guru

Registered: 06/24/04
Posts: 126
Loc: London, England
Is there any way to verify if a page name exists in a form?

What I want to do is execpage(trim(@(6,1,10)), but I need to check if the data matches a valid page name first I think.

Top
#20838 - 11/16/07 08:22 AM Re: Check if page name valid
Anonymous
Unregistered


Hello,

There is no way to check if a document page exists however, what I would suggest is creating a global array and adding all the page names to the array.

Then you could loop through all those values and verify if the page exists.

This is not as clean as checking for the page name but should work fine.

Top
#20839 - 11/16/07 10:34 AM Re: Check if page name valid
Chris_10 Offline
OL Guru

Registered: 06/24/04
Posts: 126
Loc: London, England
Thanks. Actually thinking ahead, the idea I had may not have been suitable because a single page may end up relating to more than one different value contained in the data. I'll probably end up with a few statements like:

if(gt(pos('*'+trim(@(6,1,10))+'*','*xyz*'),0))
execpage('xyz')
endif()

Top


Moderator:  cosimo, OL Newsgroup Support