I am working the following statement:
{if OBSNOW("INJ_RE_1") == "No reaction." then CFMT(OBSNOW("INJ_RE_1"),"","Patient waited 20 min after injection. No swelling or redness to arms.","","
") else ""
end if}
It is returning:
{if F3449156527968921640_1 == "No reaction." then CFMT(F3449156527968921640_1,"","Patient waited 20 min after injection. No swelling or redness to arms.","","
") else ""
end if <-COMPILER ERROR NEARBY: Expect EXPRESSION. Instead had RIGHT CURLY BRACE after IF KEYWORD
I have tried a few edits on the statement and am still getting the same thing. I am sure that it is something stupid that I am missing. Any help would be appreciated.
A simple thing I noticed... is "end if" the same as "endif" without a space in it? I have always written without the space character.
Next thing I would try is to get rid if the whole CFMT command and make that simple to be "true or yes". That way, make sure no logic issues with front part of if.
Next would be to to you CFMT without any if logic, to make sure no syntax errors in the CFMT.
Lastly, not sure where you are doing this, but seem to recall some limitation(s) on where and what could use a CFMT command.
I have a radio button within a form that the options are No reaction. and Reaction as noted below. I have this in the translation area of the radio button. The doctor wants the text:Patient waited 20 min after injection. No swelling or redness to arms to populate if no reaction is selected. If reaction as noted below selected then that is what would translate.
Joe has it - your "end if" needs to be "endif".
Thank you both. That was it. Sorry I didn't make that change with the first suggestion. Really sorry I missed something so simple.
OK I made it work thanks to your help but it is returning false. I am receiving a "FALSE" return if it does not fit my if then.....which leads me to believe I screwed up the else. However, I have tried many different options and I either get false, no answer at all, or MEL
{if OBSNOW("INJ_RE_1") == "No reaction." and DOCUMENT.VIAL_1 <> "" then OBSNOW("INJ_RE_1","Patient was observed for 10 minutes. No redness or swelling to injection site.
")
else
endif}
In the statement you entered above you are missing the double quotes between else and endif, that tells it to do nothing if the statement is not true.