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
#19854 - 08/14/06 01:29 PM Selecting Data Fields using an Identifier
ccooper Offline
OL Newbie

Registered: 08/14/06
Posts: 7
Loc: Harrisburg, PA
I have a CSV data file that can contain a variable amount of lines. I need to pull data from the last two lines, which are typically line 20 and 21. When there are additional fields before these two, it may move them to 22 and 23, 24 and 25, etc.

I've asked our DB Analyst to place indentifier characters before these two fields. Is there an expression that I could use to say, 'when you see this character, print the data after it in this location'?

Thanks in advance for your help.

Top
#19855 - 08/15/06 05:12 PM Re: Selecting Data Fields using an Identifier
JediToby Offline
OL Expert

Registered: 01/14/02
Posts: 154
Loc: Salt Lake City, UT
I think something like a For loop in PressTalk will help you here. Use it as a condition to set the line number for a data selection:

define(&line,integer,1)
define(&target,string,'target')
define(&hereitis,integer,0)

for(&line,1,1,&lpp)
if(@(&line,1,6)=&target)
&hereitis:=&line
exit()
endif()
endfor()
_________________________
Toby Dillon
Skymail International

Dim null as nothing = "42"

Top


Moderator:  cosimo, OL Newsgroup Support