I am trying to format text in a function. Here is the function:
{fn fnAddGeneral(){
local retString
retString = (FMT("GENERAL: ", "B")) +"General well nourished, well hydrated, no acute distress"
return retString
}}
It sort of works. It puts the text in the note correctly but in my multi edit box, it looks like this:
\b GENERAL: \b0 General well nourished, well hydrated, no acute distress
I'm not real sure how to get rid of the escaped b characters in the box.
The FMT and CFMT functions that are used to format text, really should only be used in the Translation Section of a note. They are designed for that area, and will make the note much more readable. Using the FMT function on the text that a multi-edit box is supposed to display will cause it to have format code like the\b you are getting.
remove the FMT in your function like this:
{fn fnAddGeneral(){
local retString
retString = “General well nourished, well hydrated, no acute distress”
return retString
}}
Then in the Translation for that Multi Edit Box, use CFMT (conditional format) to create the formatted text with the word General in the front. It should look something like this:
{CFMT(DOCUMENT.MULTI_EDIT+BOX , "" , "GENERAL" , "B" , "", "")}
Hope this answers your question. let me know if I need to clarify anything, or if you are attempting something else.
Thank you,
Daniel Carpenter
Daniel,
Thank you very much. That's exactly what I needed. I was trying that and making a silly mistake. I was putting quotes around the DOCUMENT.MULTI... section.
You are very welcome! glad to have helped. ^_^