Q

How can I validate a Rich Text field? And which access level wins?

How can I validate a Rich Text field? Can I use JavaScript and LotusScript? If so, how?

Also, in a database, one user is assigned in GroupA and GroupB. In GroupA the user has Reader access level, and in GroupB the user has Author access level. Which access level applies to this user?
To answer the second part first, the user who is in both groups would have Author access level -- when a user is contained in multiple groups, he or she is given the highest access level allowed of any of the groups.

Yes, you can validate a Rich Text field with JavaScript and LotusScript. With LotusScript, you can use the FieldGetText method on the NotesUIDocument class to get a regular string to test. Here is a quick example of validating a Rich Text field with LotusScript:

 Dim uiws As New NotesUIWorkspace,
 uidoc As NotesUIDocument
 Dim sRichText As String
 Set uidoc = uiws.CurrentDocument
 sRichText = uidoc.FieldGetText("rt")
 ' Sample Validation code
 If sRichText = "" Then
  Msgbox "please input rich text"
 Else
  Msgbox "the rich text entered is: " + sRichText
 End If
And here is a similar example of JavaScript code to do the same thing, in this case using the DOM to access the value of a field named rt.
sRichText = document.
forms[0].rt.value
// Sample validation code
if (sRichText == "") 
{
alert("Please input some rich text")
}
else
{
alert("the rich text you entered is: "
 + sRichText)
}

This was first published in October 2003
This Content Component encountered an error

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close