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)

Page 1 of 2 1 2 >
Topic Options
#52465 - 10/01/15 12:37 PM User Defined Data
GBowlsby Offline
OL Expert

Registered: 08/07/14
Posts: 167
Loc: Tallahassee FL
I need to split my data when in finds 100000000 at the beginning of the line. I have tried the following, but data isn't being separated.

define(&marker,string,'100000000')
if(mid(&str,9,length(&marker))=&marker)
if(&current.line>0)
doform()
clearpage()
endif
endif

set(&current.line,&current.line + 1)
store(&current.line,&str)
if(&current.line>=&current.lpp)
doform()
clearpage()
endif()

Top
#52467 - 10/01/15 01:50 PM Re: User Defined Data [Re: GBowlsby]
CSP Offline
OL Toddler

Registered: 10/27/01
Posts: 48
Hi,

You can tray this example:

if(left(&str,9)='100000000')
set(&current.line,&current.line + 1)
store(&current.line,&str)
doform()
clearpage()
endif()
set(&current.line,&current.line + 1)
store(&current.line,&str)
if(ge(&current.line,&current.lpp))
doform()
clearpage()
endif()


CSP

Top
#52468 - 10/01/15 01:52 PM Re: User Defined Data [Re: GBowlsby]
CSP Offline
OL Toddler

Registered: 10/27/01
Posts: 48
I mean "try" not "tray".

CSP

Top
#52470 - 10/01/15 02:53 PM Re: User Defined Data [Re: CSP]
GBowlsby Offline
OL Expert

Registered: 08/07/14
Posts: 167
Loc: Tallahassee FL
That did not separate the data either. It gave me the first line, but all other data was merged.

the following seems to be working, be rather search for 1000 and not just 1

define(&marker,string,'1')
if(mid(&str,1,length(&marker))=&marker)
if(&current.line>0)
doform()
clearpage()
endif
endif

set(&current.line,&current.line + 1)
store(&current.line,&str)
if(&current.line>=&current.lpp)
doform()
clearpage()
endif()

Top
#52472 - 10/01/15 06:01 PM Re: User Defined Data [Re: GBowlsby]
CSP Offline
OL Toddler

Registered: 10/27/01
Posts: 48
Hi,

This worked for me!

if(left(&str,9)='100000000')
doform()
clearpage()
endif()

set(&current.line,&current.line + 1)
store(&current.line,&str)

if(ge(&current.line,&current.lpp))
doform()
clearpage()
endif()


CSP

Top
#52473 - 10/01/15 07:50 PM Re: User Defined Data [Re: CSP]
GBowlsby Offline
OL Expert

Registered: 08/07/14
Posts: 167
Loc: Tallahassee FL
Data not splitting with that.

Here is the code I entered:
[img]https://onedrive.live.com/redir?resid=81C066941585FBAB!120232&authkey=!AMC3onL1FwteuDs&v=3&ithint=photo%2cjpg[/img]

Here is the result
https://onedrive.live.com/redir?resid=81C066941585FBAB!120230&authkey=!ANqgqPB1QgMIBVI&v=3&ithint=photo%2cjpg

Here is what I need:
[img]https://onedrive.live.com/redir?resid=81C066941585FBAB!120231&authkey=!ABQpQdrcPX-ijxs&v=3&ithint=photo%2cjpg[/img]

Top
#52478 - 10/02/15 10:19 AM Re: User Defined Data [Re: GBowlsby]
CSP Offline
OL Toddler

Registered: 10/27/01
Posts: 48
GBowlsby,

Now it's clear. Test it with this code. I believe it will work now.

if(left(&str,1)='1')
doform()
clearpage()
endif()

set(&current.line,&current.line + 1)
store(&current.line,&str)

if(ge(&current.line,&current.lpp))
doform()
clearpage()
endif()

CSP

Top
#52502 - 10/06/15 07:40 PM Re: User Defined Data [Re: GBowlsby]
GBowlsby Offline
OL Expert

Registered: 08/07/14
Posts: 167
Loc: Tallahassee FL
Just had a chance to try this code. The first data page is blank, but the data is separating. Is there a way to skip blank pages?

Top
#52513 - 10/08/15 02:14 PM Re: User Defined Data [Re: GBowlsby]
CSP Offline
OL Toddler

Registered: 10/27/01
Posts: 48
You can apply a condition on every page. On the property pages, condition, type:

@ = (1,1,1) = '1'

So the pages will be run only when there is the character "1" in the first position of the data page.

Top
#52515 - 10/08/15 02:20 PM Re: User Defined Data [Re: GBowlsby]
CSP Offline
OL Toddler

Registered: 10/27/01
Posts: 48
Or you can also set on the property of the document check the option "skip blank data pages".

Top
Page 1 of 2 1 2 >