[stackoverflow] [progress Openedge Abl] How Can I Get The Last Item Of A Table Inside A For...

  • Thread starter Mr. Derpinthoughton
  • Start date
Status
Not open for further replies.
M

Mr. Derpinthoughton

Guest
I've been trying to get the last item of a table after I iterated through it using a for each statement and the using last-of to get the last one, but it's getting all items instead of getting only the last one. This needs to be done inside a for each because I'm populating a website template(.tpl) with the data.

Tables:


table has two items

Here's my theoretical code:

for each table where table.tab-code = (<There is another for each around this one>)
no-lock break by table.tab-code.

if last-of (table.tab-code)
then do:
disp "last one".
end.
else do:
disp "not the last one".
end.
end.


Output:

last one

last one

Continue reading...
 
Status
Not open for further replies.
Top