Need form build help...I need to add a users current clinic location and address to a form. We only have the symbol option of adding clinic name. (the symbol for address is "for printing use only"). If I try to use this symbol, it breaks the form. thanks!
I am a little curious why you need to display the address, but here is how I would do it. put this code in the right hand section for the form you are building:
{fn getLOCAddress(){
local result = ""
cond
case USER.CURLOCATIONNAME == "Moses Lake"
result = "605 S. Coolidge St" + HRET+ "Moses Lake, WA" + HRET+ "98837"
case USER.CURLOCATIONNAME == "Quincy"
result = "123 S. Main St." + HRET+ "Quincy, WA" + HRET + "98837"
else result = ""
endcond
return result}}
then in your data display, just type: {getLOCAddress()}
You can put as many case statements in the function as you need, and you can even do a default address in the else section in case they ad a new LOC and you don't update your form.
Let me know if you need any details or further help.
Thank you,
Daniel Carpenter
Here is the way to get all of the location of care information via MEL objects:
{DOCUMENT.LOCOFCARENAME}
{find("LookupLoc","Address1","Name",DOCUMENT.LOCOFCARENAME)}
{find("LookupLoc","Address2","Name",DOCUMENT.LOCOFCARENAME)}
{find("LookupLoc","City","Name",DOCUMENT.LOCOFCARENAME)}, {find("LookupLoc","State","Name",DOCUMENT.LOCOFCARENAME)} {find("LookupLoc","Zip","Name",DOCUMENT.LOCOFCARENAME)}
{find("LookupLoc","primPhone","Name",DOCUMENT.LOCOFCARENAME)} Fax:{find("LookupLoc","faxPhone","Name",DOCUMENT.LOCOFCARENAME)}
If you put that in a quick text, you get something like:
Millennium Health System
20500 NW Evergreen Pkwy
Suite 100
Hillsboro, OR 97124
503-531-7000 Fax:503-531-7002