I'm trying to use a browse in Progress-4gl that will run a control-key to display the number of selected lines within the browse, as well as a total quantity from a temp table for all the lines selected. I have been able to get the total number of lines easily, but when trying to get a total quantity from the temp-table I created, it just has the last selected row value. How do I run a for each from the selected rows? Here's some code I have for the browse:
on CTRL-L of browse-1 in frame a do:
assign buf-cnt = 0.
/*** FOR EACH BROWSE RECORD SELECTED **/
assign jqty = jqty + int(tt.tt-qty).
assign jlines = browse-1:num-selected-rows.
display
jlineslabel "Selected Number Of Lines"
jqtylabel "Quantity Of All Lines"
with frame fselect down row 5 centered overlay.
pause.
end. /* on CTRL-L */