dlangschied
Member
I have a FOR EACH with which I need some help. It is a picklist table. I want to display records, but I have some records that are incomplete or open. If the user selects to see only these lines I want to restrict my FOR EACH on that information. The table has a small number of records today, but it will certainly grow. The code below is what I started with for getting the records I want. I want to pull the condition if open-only into my FOR EACH. I tried an example that I found in the progress documentation, but I could not get it to work in my instance.
Progress example:
I added the following at the end (before first sort):
and xxpick_status = (if open-only = yes then rpt-stat)
i set rpt-stat = "" at the top of the procedure. I did not add an else, because I don't need one. If open-only is no then include all records.
Any ideas?
David
Code:
for each xxpick_mstr no-lock
where xxpick_domain = "usa"
and xxpick_site >= site and xxpick_site <= site1
and xxpick_nbr >= mnbr and xxpick_nbr <= mnbr1
and xxpick_prline >= pline and xxpick_prline <= pline1
and xxpick_part >= part and xxpick_part <= part1
by xxpick_site by xxpick_nbr by xxpick_part
by xxpick_print_date by xxpick_print_time
with frame b width 132 no-box down:
if open-only and xxpick_status <> "" then next.
Progress example:
Code:
f WHERE a >= (IF a1 NE 0 THEN a1
ELSE -99999999) AND
a <= (IF a1 NE 0 THEN a2
ELSE +99999999)
and xxpick_status = (if open-only = yes then rpt-stat)
i set rpt-stat = "" at the top of the procedure. I did not add an else, because I don't need one. If open-only is no then include all records.
Any ideas?
David
Last edited by a moderator: