I am attempting to send a flag with an action button in a VFE form. The flag pulls a certain value entered into a form field in the message of the flag. If the value writes to a document variable then I can get it to work no problem into the flag message. However, I cannot get it to work if I would like it to write to an obs term. I am sure I am missing some key component but wondered if anyone can help.
Here is the code I am attempting below. What it is doing is wiping out the data I entered into the field replacing it with blank.
{MEL_SEND_FLAG("Flag","nch_cspy_bucket","N",str(._TODAYSDATE),"Colonoscopy Request", cfmt(obsnow("CSPYTIMEFRM","")) ,"summary","")}
Thanks everyone!!!
I figured it out thanks everyone!!
{MEL_SEND_FLAG("Flag","nch_cspy_bucket","N",str(._TODAYSDATE),"Colonoscopy Request", cfmt(obsnow("CSPYTIMEFRM"),"") ,"summary","")}
The correct way to do it is this -
{MEL_SEND_FLAG("Flag","nch_cspy_bucket","N",str(._TODAYSDATE),"Colonoscopy Request", obsnow("CSPYTIMEFRM") ,"summary","")}
When you add a second parameter to obsnow, {obsnow("CSPYTIMEFRM","")} It sets the value of that observation term to the second parameter, which is blank in this case. You can also add a third parameter to pass a different date {obsnow("CSPYTIMEFRM","Yes","12/01/2017")}. If you just want to read the value, only pass the name of the observation {obsnow("CSPYTIMEFRM")}
Hope that helps in the future.