Kenneth Chow
Member
Is it possible to write a dynamic for each loop to display records on different sorting fields based on variable conditions??
i.e. when condition 1:
for each table1 by field1:
disp field1 field2.
end.
when condition 2:
for each table1 by field2:
disp field1 field2.
end.
Since all the logic remains the same, I don't want to be so silly to write 2 exact loop just different on sorting sequence. Can any expert give me advice??
i.e. when condition 1:
for each table1 by field1:
disp field1 field2.
end.
when condition 2:
for each table1 by field2:
disp field1 field2.
end.
Since all the logic remains the same, I don't want to be so silly to write 2 exact loop just different on sorting sequence. Can any expert give me advice??