Notes of my Lotus Notes Headline Animator

Search My Blog

Friday, August 27, 2010

Hiding a Rich-Text field in Lotus Notes

Hiding a rich-text field. This is what my sis has been trying to achieve from past 2 hours now. Ah... it feels so irritating when you try to use all sorts of hide-when condition and it doesn't work. We tried normal field properties hide-when condition, tried sections, tried computed/computed for display etc. It did not hide.

Then I tried to google about it. It showed me several links with all stories in it. In the summary of a link I saw the name "subform". Eureka!!! I found it.



Then she created two subforms, ReadBody and EditBody and used the following formula in my main form.
@If(@IsMember("[< Role >]";@UserRoles);"< ReadOnlySubform >";"< EditOnlySubform >")

In the EditBody subform she created a RichText field with name as Body and Type as Editable, with default value as Body.


In the ReadBody subform she created a RichText field with name as dispBody and Type as Computed, with default value as Body.


In the main form, she added the subform as Computed one; set the formula as:
@If(@IsMember("[Roster Admin]";@UserRoles); "ReadBody"; "EditBody")


Thus, for the people with a specific role, the RichText field is editable and for other it's a read-only field.

It's now so easy to hide RichText fields or just making them Read-Only.

Hope you find this solution valuable.

1 comment:

Anonymous said...

very useful