Solved

Rich Text Fields from One Doc to Another

Posted on 2001-07-20
2
477 Views
Last Modified: 2013-12-18
In Lotus Notes design ...  I am trying to bring in data from fields in one doc to another (by unique docid) using an action button which has this code below.  This brings in the data sucessfully for Category but not for Body.   The only difference is that Body is a Rich Text field, while Category is not Rich Text.    How do I get a Rich Text field from one doc to another?   Thanks.

REM "The Unique ID field point to doc that houses the template.";
FIELD Body     := Body;
FIELD Category := Category;
@SetField("Body";    @GetDocField("2E02E270D58FA62286256A8F005937DF"; "Body"    ));
@SetField("Category";@GetDocField("2E02E270D58FA62286256A8F005937DF"; "Category"))
0
Comment
Question by:blyons48
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
puneetfred earned 100 total points
ID: 6303321
This is given in Notes help. pls see below:

Examples: AppendRTItem method

This script takes the Body item on document B and appends it to the end of the Body item on document A. The Body item on document B is deleted using the Remove method defined in NotesItem.

Dim docA As NotesDocument
Dim docB As NotesDocument
Dim rtitemA As Variant
Dim rtitemB As Variant
'...set values of docA and docB...
Set rtitemA = docA.GetFirstItem( "Body" )
Set rtitemB = docB.GetFirstItem( "Body" )
If ( rtitemA.Type = RICHTEXT And _
rtitemB.Type = RICHTEXT ) Then
  Call rtitemA.AppendRTItem( rtitemB )
  Call rtitemB.Remove
  Call docA.Save( False, True )
  Call docB.Save( False, True )
End If
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6303413
Your formula will work if you do that from an action/agent from view by selecting the document where you want the contents to be transfered. @getdocfield for Rtitem will not work in UIdocuments. It will work only for backend document. Even the script will append the rtitem, but you have to save and close and reopen the document for the richtext to realize.

~Hemanth
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question