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
#36030 - 05/12/11 12:26 PM Get Data from next Page
abruss Offline
OL Newbie

Registered: 05/12/11
Posts: 1
Is there a way that I can peak at the next page and get that value to print on the current page?

Top
#36034 - 05/12/11 04:19 PM Re: Get Data from next Page [Re: abruss]
Benoit Potvin
Unregistered


Yes there is. It would involve metadata and thus this solution wouldn't work if the form is executed on a PlanetPress Licensed printer (but it would in Optimized PostScript Stream mode).

Here is an example.

Let's say we have a Line Printer data file.

Let's say our goal is do display the name of the current client plus the name of the next client on the same page.

Putting the name of the current client on the page is simple: a data selection will do.

To put the name of the next client on the same page, we need this name to be available.

To make this next customer name available on the current page, we first create a Metadata Field 'ClientName' with the current client name as the value. We make sure the metadata field is created at the job level and that the create action is 'Add Field' (not replace nor append).

We then refresh metadata. Taking a look at the metadata at the job level, we should view that there are now as many metadata fields 'ClientName' as there are data pages.

The trick is that on datapage N, we will display the value of the (N+1)th 'ClientName' metadata field. Here's how: on the page, we create a custom data selection with the following expression as the value:

=GetMeta('ClientName[' +inttostr( &current.metadatapage)+ ']', 0, 'Job')

Meaning: at run time, the value will be replaced by the value of the (&current.metadatapage)th ClientName metadata field at job level, where &current.metadatapage is the index of the current datapage. Since metadata fields are zero-based, you don't need to add 1 to the datapage index.

So in the end, you end up displaying data from the Nth data page plus the value of the (N+1)th 'ClientName' metadata field.

Note that on the last datapage, the 'ClientName' value will be empty.


Hope this helps! If you are an OL Learn student, feel free to request a webinar on this topic.


Benoit

Top