Is it Possible To Create an Input Validation of a Rich Text Field?
Something you'd probably figure out if you thought about it long enough, but this might save you a few seconds... From the KnowledgeBase...
Is it Possible To Create an Input Validation of a Rich Text Field?
Document Number:
1103383
Problem
A customer would like to be able to
prevent users from leaving a Rich Text field (RTF) without entering text.
The Rich Text field does not have an Input Validation formula associated
with it. How can a user be forced to enter text in the Rich Text
field before saving the document?
Content
For the following it is presumed that
the Rich Text field is called "rtfield".
1. Below
the Rich Text field on the form create a Text field. This allows
you to use its Input Validation formula to point to the Rich Text field.
If needed the Text field could be hidden from the user and used explicitly
for design purposes.
2. In
the Input Validation formula of the Text field enter the following formula:
@If(@Abstract([TextOnly];10;"";"rtfield")="";@Failure("
you must enter some text ");@Success)
Note: When referencing
a Rich Text field you will not be able to check for an empty field value
by using:
a) @If(rtfield = "";
....)
b) @If(@Contains(rtfield; "");
....)
In addition, the [textonly] parameter
does not consider file attachments as text. Thus, the user will
still be forced to enter text in addition to the file attachment when the
[textonly] option is used.
Supporting Information:
This process can also be done with LotusScript
in the Exiting event of the Rich Text field. Refer to the technote,
"How to Lock Documents via LotusScript to Prevent Simultaneous Access"
(#155070) for a good example.



Comments
Posted by Duffbert At 12:33:42 On 24/02/2004 | - Website - |
..Code ...
'Selection and deselecting an empty field will create 4407 error:
On Error 4407 Goto RichTextEmpty
call source.gotofield("RTField")
call source.selectall()
call source.Deselectall()
...rest of the code...
exit sub
RichTextEmpty:
msgbox "Please put somthing in the richtext field"
call source.gotofield("RTField")
continue=false
exit sub
i think it works for Windows only.
Posted by Full validation (indlude attachments) At 12:09:36 On 24/02/2004 | - Website - |