campagnolo1
Technical User
Ok,
after another day of banging my head against the wall and scouring through forums I have to say that I'm at the end of my witts.
Just to recap real quick as to what I'm trying to do:
1. I have a memo field that I converted to Text.
2. I want to go through this text field create an array that holds the values for each line of this text field.
3. Then I want to go through the created array line by line (value by value) and check for the following conditions:
a) If there is a "No" in the line show a blank line " ".
b) If there is a "--" in the line, split the line at "--" and only show everything to the right of "--" until the chr(13)
c)If neither of the two previous conditions are met, just show the line.
4. The result of each condition gets put into a second array and then shown in the report.
Here is my (new) code that I created:
shared NumberVar x := 1;
shared NumberVar Array lLength := {@lineCount};
shared NumberVar arrLen := UBound(lLength);
shared StringVar Array mMemo;
Redim mMemo [arrLen];
shared StringVar Array tText;
Redim tText [arrLen];
while x <= arrLen Do
(
mMemo := Split({@ToText}, chr(10)[x]);
if InStr(mMemo[x],"NO") > 0 then
tText[x] := "" else
if InStr(mMemo[x],"--") > 0 then
tText[x] := Mid(mMemo[x],(InStr(mMemo[x],"--"))+2) else
tText[x] := mMemo[x];
x := x + 1;
);
join(tText);
All I get now is the very first line of the array.
Help!
(Thank you!)
after another day of banging my head against the wall and scouring through forums I have to say that I'm at the end of my witts.
Just to recap real quick as to what I'm trying to do:
1. I have a memo field that I converted to Text.
2. I want to go through this text field create an array that holds the values for each line of this text field.
3. Then I want to go through the created array line by line (value by value) and check for the following conditions:
a) If there is a "No" in the line show a blank line " ".
b) If there is a "--" in the line, split the line at "--" and only show everything to the right of "--" until the chr(13)
c)If neither of the two previous conditions are met, just show the line.
4. The result of each condition gets put into a second array and then shown in the report.
Here is my (new) code that I created:
shared NumberVar x := 1;
shared NumberVar Array lLength := {@lineCount};
shared NumberVar arrLen := UBound(lLength);
shared StringVar Array mMemo;
Redim mMemo [arrLen];
shared StringVar Array tText;
Redim tText [arrLen];
while x <= arrLen Do
(
mMemo := Split({@ToText}, chr(10)[x]);
if InStr(mMemo[x],"NO") > 0 then
tText[x] := "" else
if InStr(mMemo[x],"--") > 0 then
tText[x] := Mid(mMemo[x],(InStr(mMemo[x],"--"))+2) else
tText[x] := mMemo[x];
x := x + 1;
);
join(tText);
All I get now is the very first line of the array.
Help!
(Thank you!)