Checking contents of Rich Text field

Greetings!

I have an application in which a user can import an employee´s picture into a RTField.

I would like to create a view in which I can point out which documents already have a picture imported and which do not.

I cannot use the @Abstract function, for there is absolutely no text, besides the picture, in this field. And also would not create another “flag field” to store “X” when the user imports the picture to the original RTField.

Is there any way to create a formula to be used in a view, just to show “X” (or “”) when a document has (or not) the picture already in place?

Any help would be greatly appreciated. Thanks in advance,

Rubens

Subject: Checking contents of Rich Text field.

@if(@Attachment;“X”;“”)

Subject: RE: Checking contents of Rich Text field.

@if(@Attachment;“X”;“”)

Unfortunatelly, it doesn´t work.

The picture was Imported to the document (in order to appear as a picture, and not as a “.JG” file).

This formula only works when the document has an attachment in it…

Thanks, anyway…

Rubens

Subject: Checking contents of Rich Text field.

You can’t use a Rich Text field in a view column formula, so you don’t have a choice when it comes to using a separate “flag” field. That being said, you can set such a field in the PostSave event of the form by checking the .ValueLength of the RT item. It will never be zero, of course, but you can use a safe minimum value (say, 512 bytes). You’ll want to check the .Text as well, just to be sure that what you are measuring with .ValueLength is not text, and you’ll probably want to check .EmbeddedObjects to make sure that you are not looking at attachment references.

That’s the easier, softer way. To REALLY be sure, you’d need to use the C API (or something that uses the C API for you, like the Midas Rich Text LSX or @Midas from http://www.geniisoft.com ) or export the document to DXL to look for a picture.