Q

Is there a way to tell if a Rich Text field has an attachment or picture?

Hello, Andre. When working with Rich Text fields is there anyway you can run a validation script to check if there

is something in the field? I know that you can check if the field has text, but what about checking if it has an attachment or a picture like a screen dump. Look forward to hearing from you. These are really three separate questions.

  1. Can you tell whether the field is totally empty?
    Yes -- refer to Validating a Rich Text field before saving the document and Validating entry of a Rich Text field. These are slight variations on the same technique.

  2. Can you tell whether the field contains attachments?
    Yes -- refer to Domino Designer 6 Developer's Handbook, page 727, for an example that you can adapt. This example actually checks to make sure no attachments exceed a size limit, but it's easy enough to see how to tell whether there are no attachments. This example uses an On Error trap to detect the absence of attachments, but you can also use the expression "IsEmpty(rtf.EmbeddedObjects."

    Note: Embedded objects can contain either attachments or OLE objects, so if you want to make sure it's an attachment, not an object, you must check the type, as shown in the example.

  3. Can you tell whether the field contains images?
    Not easily. This sort of thing requires the Notes C API or third-party tools that employ the C API, such as Midas rich text LSX from Genii Software.

This was first published in April 2003

Dig deeper on Domino Resources - Part 4

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

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