I would like to build a quicktext to only pull in the last 10 entries of a certain obs. Is there a way to limit the number of obs returned using the LIST_OBS function?
I think the following should probably do the trick for you. It will put the obs term into an array and if there are 10 or more entries return the first 10. If there are fewer than 10 it will return the whole list. I didn't have a chance to test the code below, but it should get you started.
{qlist = getfield(LIST_OBS('Weight','Signed','comma',"value"),",","")
if (size(qlist)>=10 THEN
for i=1, i<=10, i=i+1 do
if (i==1) THEN
olist= qlist[i]
else
olist= olist + ", " + qlist[i]
endif
endfor
else
for i=1, i<=size(qlist), i=i+1 do
if (i==1) THEN
olist= qlist[i]
else
olist= olist + ", " + qlist[i]
endif
endfor
fmt(olist,"")
}
thank you so much!!