Hello All,
I have a text component that I am pulling into a visit. During the visit it is likely that a staff member will update a value and I would like the text component to update with it. I used the following below, which I think should work:
{'{OBSANY(“BRSSURGDATE1”)}'}
The error that I get is: {'{OBSANY(“BRSSURGDATE1”) <-COMPILER ERROR NEARBY: NON-TERMINATED STRING was unexpected after LEFT CURLY BRACE
'}
I have single quotes to return a string and double quotes to return the obs value. I think I should be ok syntax-wise. What am I missing?
Brad
seems like this should work?
{str(OBSANY(“BRSSURGDATE1”))}
I believe that you need the second set of {} to get the value to update during the visit. After I tested your suggestion I retyped my code and it seems to be working a little bit better (I guess CPS/VFE didn't like my cut and paste) but I'm getting an error I haven't seen before. When I try to update the value in the form I get a pop up that says: "Cannot find expression '{OBSANY("BRSSURGDATE1")}' in document text."
The only thing I can think is that you need a logic expression to the effect of
{IF OBSNOW("BRSSURGDATE1") == "" THEN OBSNOW("BRSSURGDATE1",OBSPREV("BRSSURGDATE1"))
STR(OBSNOW("BRSSURGDATE1"))
ELSE STR(OBSNOW("BRSSURGDATE1"))
ENDIF}
I'm not exactly sure of what you are trying to accomplish but maybe this?