Hello,
I'm looking for suggestions regarding how to remove blank lines that are from the text translation on a VFE form. I have several fields where I cleared the text translation and will be used for entering data, and I have a field at the end of the form which contains the formatting I want for progress note.
The fields preceding the last field appear to be causing blank lines to be added before the text that is added to the progress note.
Example:
Field A (No Text Translation) Field B (No Text Translation) Field C (No Text Translation)
Field D (No Text Translation) Field E (No Text Translation) Field F (No Text Translation)
Field ProgNoteText ({FMT("Fields:","B") + HRET + Field A + HRET + Field B + HRET + Field C + HRET + Field D + HRET + Field E + HRET + Field F})
Which ends up with a result like this:
(Blank Line)
(Blank Line)
(Blank Line)
(Blank Line)
Fields:
Field A
Field B
Field C
Field D
Field E
Field F
I've tried playing with suppression blocks, but either I'm not configuring them correctly, or they're not working.
Any suggestions are welcome, as I'm starting to think I need to re-write how the form works.
Thanks in advance!
Try using CFMT.
CFMT( field , fieldformat, pretext, pretextformat, posttext, posttextformat )
If the "Field" is blank, it doesn't put anything. If it isn't blank it adds the pre/post text as well. So if a field isn't filled out, you won't get the HRET, but if it is it will add one.
{FMT(“Fields:”,”B”) + HRET + CFMT(document.FieldA ,"","","",HRET,"") + CFMT(obsnow("FieldB") ,"","","",HRET,"") + CFMT(obsany("FieldC") ,"","","",HRET,"") + CFMT(document.FieldD ,"","","",HRET,"") + CFMT(document.FieldE ,"","","",HRET,"") + CFMT(document.FieldF ,"","","",HRET,"") }
any empty lines between the closing and opening curly braces will show up as blank lines in your programming as well. So if you have this programmed in the chart note section and it doesn't start at the top then any lines above it will show as empty spaces. Also, if the field above it also has any empty space below the programming in the chart note or the chart note section simply has empty lines in it, it will do this as well. If this is programmed as a function and each opening curly brace is on a separate line than the last closing curly brace this could be the root of your issue also.
Hello,
I tried these two suggestions, but still no luck.
I did find something out though, it looks like it might not be related to the text translation, but something other behavior in regards to document text and forms.
I used the MEL symbol GET_FORM_TRANS to see exactly what the text translation was for the form. The MEL symbol returned exactly what text I put into my document field with the formatting (no extra carriage returns or anything).
I then put the default text translation formatting back for some of my data entry fields, and when I entered text into the fields, it displayed the values where the blank spaces are occurring.
So it looks like the extra carriage returns in the document text are place holders for text translation for the entry fields, even though I don't have any text translation configured for them.
Hello Again,
In case anyone is curious in the future regarding what the issue was, I figured it out.
I'm using sections to contain fields on my form, these sections appear to be getting added as blank lines in the document text.
If configure all of my sections as Begin/End Suppression Block, and my form information says "Suppression Block Behavior: Suppress Item only", my mysterious blank lines stopped occurring.
It's odd, but the issue appears to be resolved.
Blank lines between curly braces in the translation block are not typically an issue, unless they are inside open/close quotes.
The typical culprit is hard returns outside of the curly braces. Any hard return outside of curly braces will always be translated unless suppressed, as the OP discovered as the solution. Their 'finding' is close to the proper solution, but not quite (though it would work, just more work resulting in more code in the compiled form).
When removing a translation, click the clear button to ensure all hard returns in the field are also removed. By default, headers for sections and headings are formatted with a hard return + FMT statement + hard return. Most users only delete the initial hard return and the FMT statement, unaware that the second hard return exists resulting in the described issue.
Hope this helps.