Notifications
Clear all
Topic starter
Hello All,
I'm working on an handout that was requested one of our providers, and they want to show the last 2 value for a few Obs terms. I'm having a hard time coming up with the code to do that. Any help is appreciated.
Thank you!
Posted : April 16, 2019 11:24 am
Try this:
fn GetLast3Obs(strObsName){
local obslist
local obssize
local count
local getobs
local returnobs
obslist = getfield(list_obs(strObsName,"signed","delimited","value"),"|","")
obssize = size(obslist)
returnobs = ""
for count = 1, count <= obssize and count < 4, count = count + 1 DO
getobs = getfield(obslist[count],"^","")
returnobs = returnobs + " " + getobs[1] + " - " + getobs[2] + numtoascii(9)
endfor
returnobs
}
Posted : April 16, 2019 1:06 pm