I have a button set up to auto flag from a form. Is there a way to make it go to who ever is the provider of the document verses a specified user. Here is what I am currently using which works well for a specific user.
{MEL_SEND_FLAG("Flag", "Name of person", "Normal", str(._todaysdate), "Subject", "Message.", "summary", "")}
"")}
USER.LOGINNAME would get you the current user if that helps.
It would be so that the staff intiating the document would be able to send it to the provider. I tried using DOCUMENT.PROVIDER but that didn't work.
HELP says you need the login ID, not an actual name. The only thing I can find for getting any login ID is USER.LOGINNAME. About the only thing you can do is create a drop-down with known login IDs and select one to use in MEL_SEND_FLAG, unless someone else or GE has any idea.
You could build an array with login ID and names, use DOCUMENT.PROVIDER to get the name, match the array with the name to get the login ID. would mean periodic updates to the array...
replace "Name of Person" with
find("USER","LoginName","RealName",DOCUMENT.PROVIDER)
gibsonmi said:
replace "Name of Person" with
find("USER","LoginName","RealName",DOCUMENT.PROVIDER)
This seems to only send the flag to the current user. Is it supposed to be USERSEARCH?
Changing it to USERSEARCH works perfectly. Thanks everyone
I am trying to send the flag to the patients provider, it comes back to the sender.
Using:
{if document.home_support=="none" then
MEL_SEND_FLAG("Flag",find("USERSEARCH", "LOGINNAME","REALNAME",DOCUMENT.PROVIDER), "Normal", str(._todaysdate), "Home Support", "Please order a referral for home support.", "Patient", "")
else
endif}
Try changing "UserSearch" to "_UserSearch"
DOCUMENT.PROVIDER is the document's provider. If you need it to always be the patient's responsible provider try PATIENT.RESPPROVID
Thanks!
Using _USERSEARCH & PATIENT.RESPPROVID made it work perfectly!