thread767-1553861
???? //-1 for ascending order ??????
This code is great but I can't get it Ascending !!!! I have put -1 in various places and it gives error
WhilePrintingRecords;
stringvar Array codes := split({@array}, ", ");
stringvar Array result;
redim preserve result[ubound(codes)];
Numbervar k;
NumberVar p;
stringvar y;
numbervar i;
for k := 1 to ubound(codes) do
(
result[k] := trim(Maximum(codes));
for p := 1 to ubound(codes) do
(
if trim(codes[p]) = result[k] then
(
codes[p] := "";
Exit For;
);
);
);
for i := 1 to ubound(result) do (
y := y + result[-i] + ", " [highlight #CC0000]//-1 for ascending order[/highlight]
);
trim(left(y,len-2));
???? //-1 for ascending order ??????
This code is great but I can't get it Ascending !!!! I have put -1 in various places and it gives error
WhilePrintingRecords;
stringvar Array codes := split({@array}, ", ");
stringvar Array result;
redim preserve result[ubound(codes)];
Numbervar k;
NumberVar p;
stringvar y;
numbervar i;
for k := 1 to ubound(codes) do
(
result[k] := trim(Maximum(codes));
for p := 1 to ubound(codes) do
(
if trim(codes[p]) = result[k] then
(
codes[p] := "";
Exit For;
);
);
);
for i := 1 to ubound(result) do (
y := y + result[-i] + ", " [highlight #CC0000]//-1 for ascending order[/highlight]
);
trim(left(y,len-2));