TechTip--Display Rich Text Fields in Domino Views

Collaboration & Messaging
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Q: Lotus Notes/Domino cannot display Rich Text fields within the columnar format of a view. For instance, I need to create a view of documents that contain the field called $Body. However, I can't create a column that will display the field in the view because it was defined as a Rich Text field. Is there some way around this? I need to be able to see the contents of the $Body field in a column of the new view that I am creating.

A: Lotus views can't directly display a Rich Text field. However, you can create a formula that extracts the text content of the Rich Text field to store that text in a hidden field that is defined as a simple Text field. Then, within the view you wish to create, you would define a column that displays the hidden field instead of the Rich Text field.

This is done using an @ function called @Abstract with the TextOnly command.

Create the hidden text field on the form that you want to display in your view. In our example, let's call this field HiddenUserField. This field should be defined as a "Computed when composed" field as shown in the figure below:

http://www.mcpressonline.com/articles/images/2002/Tip%20for%20displaying%20Rich%20Text%20fields%20in%20Domino%20ViewsV300.png

Within the "Value" definition of this field, enter the following formula using the @Abstract function:

@Abstract( [TextOnly] ; 64000 ; "" ; "$Body" )

Now, when the $Body field is created or changed within the form, the text contained within that field will be extracted and placed into the HiddenUserField. If you subsequently create a Notes/Domino view, you can create a column that displays the HiddenUserField, and the contents will be made available within the view.

Note: This technique will work for every newly created or changed $Body field within the form. However, for older documents that have not been updated, the value of HiddenUserField will remain uncomputed until you refresh the values of the $Body field within the document. Do this manually by opening each document in edit mode and pressing F9 or by writing an agent that goes through the database performing an @Command([RefreshHideFormulas] ) command for the form.

--Thomas M. Stockwell
This email address is being protected from spambots. You need JavaScript enabled to view it.

MCMagOnline pays for tips!
Send your tips to
This email address is being protected from spambots. You need JavaScript enabled to view it.

Thomas Stockwell

Thomas M. Stockwell is an independent IT analyst and writer. He is the former Editor in Chief of MC Press Online and Midrange Computing magazine and has over 20 years of experience as a programmer, systems engineer, IT director, industry analyst, author, speaker, consultant, and editor.  

 

Tom works from his home in the Napa Valley in California. He can be reached at ITincendiary.com.

 

 

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: