HiThere are 5 different richtext-field in my form.
I want to change different subform if someone attach a file in my richtextfiled called RTMember and RTUser.
How will a see if something be in this two richtext-field.
I hope to use something like this in Computed Subform.
@If(RTMember=“”;“RTMemberSubform1”;“RTMemberSubform2”)
Kind regards
Fredrik
Subject: Is there anyway to see if thera are files in a Richtext-field?
There is no @formula which will return attachment names from a particular RT field. @Attachments will return names of all attachments from the document.
The following is a piece of Lotus Script that will get you the names of files attached to the particular rich text field.
“doc” is the current document
Dim myRTfield as NotesRichTextItem
Dim fileList as String
Set myRTfield = doc.GetFirstItem(“myAttachmentsFieldNameGoesHere”)
Forall ObjVar In myRTfield.EmbeddedObjects
If ObjVar.Type = 1454 Then 'its a file
ObName$ = ObjVar.Source 'file name
If fileList = “” Then 'collect the file names for logging
fileList =ObName$
Else
fileList = fileList + ", " + ObName$
End If
End If
End Forall
script is easy to modify if you just want to check if there are any attachments at all and do not care about the file names.
Hope this will help
Marek Szymanski
DLI Tools Inc
http://www.dlitools.com
Subject: Is there anyway to see if thera are files in a Richtext-field?
There are not recomending use more than one rich text field on the form…but if you need, you can use the @attachments to see if the document HAVE attachments and, then use that formula you public…but is better if the subform are “down” of the rich text field.
Daniela