I’ve got a form with a Rich Text field on it, and a Text field. I have added a graphic next to each field that should display if the contents exceeds 4000 characters. The onChange event of the RTF field calls uidoc.Refresh to make sure that the script can see the contents of the RTF field.
Can someone explain why the formula for the rich text field below has to be different to the normal text field, for it to behave in the same way? I have to check on 4002 characters for RTF fields and 4000 for normal text fields.:
Hide formula for graphic next to RTF:
@Length(@ReplaceSubstring(@Text(field1); @NewLine; “…”))<=4002
Hide formula for graphic next to text field:
@Length(@ReplaceSubstring(@Text(field2); @NewLine; “…”))<=4000
The same text pasted in to each field of 4001 characters makes the graphic appear next to them, 4000 or less and the graphic goes away. But if I change 4002 to 4000, I see the graphic when there is 3999 characters.
It would be nice to have an exact explanation as to why this is happening so I can rule out the possibility of some bizarre combination of characters in the RTF field breaking the system and getting the graphic to display when it shouldn’t. Is it just as simple as saying there is an internal 2 characters added to all RTF fields by Notes? Or does Notes stick a carriage return on the end of the field?
Any help would be brilliant. Thanks,
Andy