Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make Array query

Status
Not open for further replies.

Smithsc

MIS
Apr 20, 2007
143
GB
Within crystal XI, I've got a memo field which contains the following information:
Incomplete:06/05/2010 15:17:00<BR>Corrected:07/05/2010 08:58:00<BR>Incomplete:07/05/2010 12:05:00<BR>Corrected:10/05/2010 09:10:00<BR>

The example above shows 2 instances of Incomplete but there could be 1 instance or 3 or more instances.

What I'm trying to do is create an array that will contain the date/time for each incomplete instance but I can't seem to do it.

Does anyone have any suggestions?

Many Thanks

Stuart.
 
A formula like this will build an array

local stringvar array incomplete:= ["", "", "", ""];
// array will need to be big enough for max possible
Local numbervar n:=1;

While n < count(split(yourmemo, 'Incomplete:'))
do (incomplete[n]:=
left((split(yourmemo, 'Incomplete:')[n+1]), 19);

n:=n+1;);

Ian
 
Thanks Ian,

One further (probably simple) question.
How do I print the array out?
 
Function Join

Join(incomplete,",")

This will list with comma delimters, however, it will show commas for blank cells too.

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top