Everyone here is very helpful and I wanted to say thanks to all that have helped me so far, I was thrown into making forms for our office and have not found any good sources (any suggested resources?) for learning VFE but the members on this forum are amazing!!!
My new problem is formatting a flow sheet to print out on a handout. If I do:
{GET_FLOWSHEET_VALUES('Enterprise\Therapy Home Exercise')}
I get every date something was entered into that flow sheet. I need to be able to just show the information that was entered on the current visit.
Again, thanks for everyone's help!!!!
This should get you results for the last three days, if you want to chnage that adjust this line - "dur < 4" in the function. You could read it as include results if they are less than 4 days old. Hope that helps
{fn fnCVS_LabTestResults()
{local list = ""
local sz, i, dt, tody, lab, dtbegin, dur
local lablist
local labs = GET_FLOWSHEET_VALUES('Enterprise\Therapy Home Exercise')
if labs <> "" then
lablist = getfield(labs, "\n", "")
sz = 0+size(lablist)
for i = 1, i <= sz, i = i + 1 do
dt = ""
tody = str(._todaysdate)
lab = lablist[i]
if size(lab) > 0 then
dtbegin = match( lab,"/") -2
dt = sub(lab, dtbegin, 10)
dur = durationdays(dt, tody)
if dur < 4 then
list = list + lab +"\r\n"
else
list = list
endif
else
list = list
endif
endfor
if list == "" then list ="No lab results." endif
else
list="No lab results."
endif
return list
}}{fnCVS_LabTestResults()}
PERFECT!! Thank you. Do you by chance know of any reading material or reference material to read? I hate to keep coming on here and relying on great people like yourself for such little things. And again thank you for your help you have been amazingly helpful!!
Would this be the same code for Centricity 9.5 forms? I have entered the previous code in a VFE in 9.5 and I get a blank box.
Thanks