Has anyone been able to create dynamic tables within the RTF chart text for office visits? I've been struggling with this because the RTF syntax within CPS doesn't work the same as WordPad or Word. The only way I can do this currently is to put a static RTF table in a Text Component and insert that text component, but I would rather be able to create these dynamically.
Ultimately, I will be building this into my HTML forms to dynamically build out tables when needed in the chart note so that certain data is organized on the page without the use of tabbing.
Hi Mike,
It is possible, and we've been able to do that at Blackbird. It has been a real boon to presenting information in a more legible way. I have found the following URL very helpful in getting started with dynamic RTF: RTF Tutorial
Not all of the basic RTF markup works in Centricity, but enough does to make the time investment worthwhile. I hope that helps!
David
Thanks for replying David! You're the one that gave me the idea to work on this.
I'm working on trying to get the basic example of one row, one cell working, but it doesn't seem like CPS is taking it. Here is what I'm using: \\trowd\\trgaph180\\cellx1400\\pard\\intbl test.\\cell\\row
I'm assigning this to a DOCUMENT variable that is contained in a VFE form on the document. So, the javascript function this:
Mel.eval("{DOCUMENT.VS_TRANSLATION4 = \"\\trowd\\trgaph180\\cellx1400\\pard\\intbl test.\\cell\\row\"}");
However, I get like 5 error pop-ups and one of them is this says "pos: 1187, control:1, beg group: 0, end group: 0, word: cellx, word len:5." The others say Read Aborted and Table Cell found without Table Row. Any ideas on what could be going wrong here? It makes it seem like it doesn't like cellx1400.
EDIT: After reviewing the text in DOCUMENT.HoldText via SQL, it looks like it is converting "\\trowd" to "\tab rowd". So, I need to find a way to keep it from converting that \t to \tab.
Try your code with the following at the end:
...\\cell\\row"}
That last backslash might be messing things up.
David
I needed the \" because all this code contained in Mel.eval(""). Still seems to bugger out even when the last backslash is gone:
Mel.eval('{DOCUMENT.VS_TRANSLATION4 ="\\trowd\\trgaph180\\cellx1400\\pard\\intbl test.\\cell\\row"}');
It is transforming that first \\t into \tab on the backend.
I figured it out. I have to do some extra escaping. If you are assigning the document variables like I am, your code will need to look like this:
Mel.eval('{DOCUMENT.VS_TRANSLATION4 ="\\\\trowd\\\\trgaph180\\cellx1400\\pard\\intbl test.\\cell\\\\row"}');
Basically, do extra escapes on anything like \t, \r, \n, etc.
Hi David,
I know this is an old thread and a bit of a long shot, but have you had any trouble with an error message reading "Recent changes by another user have occurred in this document. Please review the note before signing." when a user tries to sign the note with the RTF tables in them?
Thanks for your time,
Robin
Hi Robin,
No, I have not come across that error (or heard other reports of it) being associated with RTF formatted text notes.
David