Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Lotus Quickr Forum

Lotus Quickr Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext

RE: QDK - QPLegal - SendMailHook for kAfterCommand
John P Warner 1.May.02 10:01 AM a Web browser
Possible Bug 2.0 Windows NT


The informatio you're looking for for NSFItemSetText is in the C API documentation. See below:

#include <nsfnote.h>

STATUS LNPUBLIC NSFItemSetText(
NOTEHANDLE hNote,
char far *ItemName,
char far *ItemText,
WORD TextLength);

Description :

This function takes a handle to an open note, the name of the item to append, and the text to store in the item. It appends a TYPE_TEXT item to the open note. If an item of that name already exists, it deletes the existing item first, then appends the new item.

Note 1: Use a null character ('\0') to force Notes to display a line break in a text field. Insert null characters in the text where you need line breaks, and specify, in argument #4, the length of the string including all null characters. Do not use MAXWORD for this argument unless ItemText contains a null-terminated string. Do not place carriage return or line feed characters in the text buffer.

Note 2: NSFItemSetText sets the ITEM_SUMMARY flag in the item. Items with the ITEM_SUMMARY flag set are stored in the note's summary buffer. These items may be used in view columns, selection formulas, and @functions. The maximum size of the summary buffer is 32K per note. If you append more than 32K bytes of data in items that have the ITEM_SUMMARY flag set, NSFItemSetText will succeed, but NSFNoteUpdate will return ERR_SUMMARY_TOO_BIG. To avoid this, decide which fields are not used in view columns, selection formulas, or @ functions. For these "non-computed" fields, use NSFItemSetTextSummary with the Summary parameter set to FALSE. Alternatively the lower level API function, NSFItemAppend, can also be used to append these items to the document without setting the ITEM_SUMMARY flag in the item_flags argument.

API program may read, modify, and write items that do not have the summary flag set, but they must open the note first. Items that do not have the summary flag set can not be accessed in the summary buffer.

NSFItemSetText is similar to NSFItemSetTextSummary. However, NSFItemSetText automatically sets the ITEM_SUMMARY flag in the item. With NSFItemSetTextSummary, you specify whether to set this flag.

Parameters :

Input :
hNote - A handle to an open note.

ItemName - A pointer to a null-terminated Item name.

ItemText - A pointer a buffer containing the text you wish to store with the item.

TextLength - A WORD containing the length of the ItemText. If MAXWORD is given, then the ItemText buffer must be null-terminated and NSFItemSetText will determine its length.

Output :
(routine) - Return status from this call -- indicates either success or what the error is. The return codes include:

NOERROR - Successfully added Text Item to note.

ERR_xxx - Errors returned by lower level functions: (memory management, file operations, etc.). There are so many possible causes, that it is best to use the code in a call to OSLoadString and display/log the error for the user as your default error handling.



Sample Usage :



/* Save Form name in the Note */

if (error_status = NSFItemSetText(note1_handle, FIELD_FORM,
form_name, MAXWORD))
goto Exit;




QDK - QPLegal - SendMailHook for kA... (Jayesh Mistry 4.Feb.02)
. . RE: QDK - QPLegal - SendMailHook fo... (John P Warner 1.May.02)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

Sign In or Register

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow