Instead of:
return "TRUE"
do:
return LASTOBSVALUE(obs)
It still keeps returning TRUE.
This is my function:
fn afterLMP(obs)
{
daysPast = DURATIONDAYS(OBSANY("LAST MP"),str(LASTOBSDATE(obs)))
IF(daysPast >= 0) Then
return "LASTOBSVALUE(obs)"
ELSE
return "FALSE"
ENDIF
}
And this is how I am calling it from the data display:
{If (afterLMP("HGB")) Then
LASTOBSVALUE("HGB")
Else
""ENDIF}
I have tried putting OBSANY in the above data display.
Any thoughts?
Thanks.
Remove the quotes from:
"LASTOBSVALUE(obs)"
Great. Thank you!
You really don't need any of the IF...Then statement.
Try this: leave the function as is, then call it like this:
{afterLMP("HGB")}
That's it. It will either return the value of the obs, or the word "False", and display it on the screen.
Awesome!
Thank you.
I'm looking at the function above and the additional code to call it from the Data Display, but this isn't working for me. Can someone please tell me where exactly in VFE to put the function? Do I put it in the pane to the right of the form? Then in the Data Display (Date field) where exactly do I place the code to call it?
Any help is appreciated. Thanks!