例: FieldClear method

次のスクリプトは、文書が保存される前に [History] フィールドに [LatestEvent] フィールドの内容を 3 つのダッシュに続けて入力します。[LatestEvent] フィールドの内容は削除されます。このため、他のイベントがこのフィールドに値を入力できます。

Sub Querysave(Source As Notesuidocument, Continue As Variant)
  Dim lastEvent As String
  lastEvent = source.FieldGetText( "LatestEvent" )
  Call source.FieldAppendText( "History", "---" )
  Call source.FieldAppendText( "History", lastEvent )
  Call source.FieldClear( "LatestEvent" )
End Sub

文書の編集と保存が 3 回行われた後の [History] フィールドは、例えば次のようになります。

---Aerial photographs of deforestation published---Government reacts---Public protests began today