Append Text/Non-Text values to a field

The function below is used to append text/non-text values to a field.

AppendToTextList can only be used to append a text value to a field and AppendItemValue does not replace the item.

Instead, it creates another item of the same name, and gives it the value you specify.

Especially when you want to append a date values ( variant ) to a multivalue date field, you cannot use the AppendToTextList since it covers the date value to a string and neither can you use the AppendItemValue because of the above limitation. The function below is used to append text/non-text values to a field.

Pass the document handle, the field name to which you want to append the value and the actual value that you want to append to the function.

Function AppendValues( doc As NotesDocument, fieldName As String, 
newValue As Variant ) As Integer ***************************************************************** ' Author : Kiran ' Purpose : This function is used to append text/non text values to the any given fieldName '**************************************************************** On Error Goto err_Handler If doc.HasItem( fieldName ) Then If doc.GetItemValue( fieldName ) ( 0 ) = "" Then Call doc.ReplaceItemValue( fieldName, newValue ) Else Call doc.ReplaceItemValue( fieldName, Arrayappend(
doc.GetItemValue( fieldName ), newValue ) ) End If AppendValues = True End If Exit Function err_Handler: AppendValues = False Resume ok_Exit ok_Exit: End Function
This was first published in June 2002

Dig deeper on Lotus Notes Domino Administration Tools

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:

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