Has anyone written a function to return the userid of the responsible provider of the current update? I think it can be done with a little research in to the mldef files, but I wanted to check on here before investing too much time on it.
Thanks,
I took a different approach to this and got it to work. If anyone else is interested, this function returns the specialty of DOCUMENT.PROVIDER:
{!fn get_docprov_spec(){
local result=""
local sdusers=getfield(GET_USER_LIST("MHS","","delimited"),"|","")
local i=1
local j=1
local matchname = ""
local matchcount = 0
local namearray = getfield(DOCUMENT.PROVIDER," ","")
for i=1,i<=size(sdusers),i=i+1
do
matchname=get(getfield(sdusers[i],"^",""),2)
matchcount = 0
for j=1,j<=size(namearray),j=j+1
do
if match(matchname,namearray[j])>0 then matchcount=matchcount+1 else "" endif
endfor
if str(matchcount)==str(size(namearray)) then result=GET_USER_SPECIALTY(get(getfield(sdusers[i],"^"," "),1)) else "" endif
endfor
return result
}}
