Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Rich Text empty

Posted on 1999-07-08
16
Medium Priority
?
650 Views
Last Modified: 2013-12-18
How do you test if a rich Text field is empty ?
0
Comment
Question by:Haddadm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
16 Comments
 

Author Comment

by:Haddadm
ID: 1119760
I have a function that test the selection unselection of a rich text field .
If there is an error, th explanation is that the rich text field is empty.

but this function doesn't work if a field tested is in a table.
0
 
LVL 6

Expert Comment

by:ghassan99
ID: 1119761
Try the HasEmbedded property of the document class.
0
 

Author Comment

by:Haddadm
ID: 1119762
I want to test the field before a save was done
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Expert Comment

by:ghassan99
ID: 1119763
u cant do that!:)
rtf's are only created on the form upon saving. u can probably test for text existence in the rtf.
0
 

Author Comment

by:Haddadm
ID: 1119764
Adjusted points to 100
0
 
LVL 2

Expert Comment

by:K_Sankar
ID: 1119765
RTF's are created only when the document is saved. May be you can try :

uidoc.fieldgettext("Body").

Where the Body is the name of the RichText field.
But pls note, this will check only for text and not attachment or objects.

0
 

Author Comment

by:Haddadm
ID: 1119766
It's not what I'm looking for.
I want to Test : Text, Attachmment, Link or .... in the field.

0
 
LVL 6

Expert Comment

by:ghassan99
ID: 1119767
Look, these excerpts are from the Notes help file:
"Rich text fields
Rich text fields cannot be evaluated for content. For example, if BodyText is a rich text field, you cannot display its contents with @Prompt, and you cannot convert it to plain text by specifying @Text(BodyText). However, you can access the attributes of the field. The following formula tests for the availability of a rich text field.
@Prompt([OK]; "Is BodyText Available"; @If(@IsAvailable(BodyText); "Yes"; "No"))"
"Updates to rich text items accessed through NotesUIDocument are not immediately incorporated into the NotesUIDocument object. You must close and open the document to see the updates."
Its the way RTFs are. U can actually test for text in the RTF ONLY (u cant test for attachments or links prior to saving) because its considered as a property of the field. u will have to think of another way to set ur application.
Good Luck
0
 

Author Comment

by:Haddadm
ID: 1119768
Adjusted points to 200
0
 
LVL 6

Expert Comment

by:ghassan99
ID: 1119769
I suggest u adjust them to 1000
0
 
LVL 6

Expert Comment

by:ghassan99
ID: 1119770
Did u realize yet that its not possible?
Visit this website:
http://www.lotus.com/partners/partcat.nsf/18ef9bc5a41c1e6b8525636300779478/ddc93e3aed154a878525667b00463bae?opendocument
This is a product from Genii soft, that has some classes to manipulate RTFs. I think it will help u. This is their website:
http://members.aol.com/GeniiSoft
0
 

Author Comment

by:Haddadm
ID: 1119771
I know that it's possible because I have a function that evaluate a RTF Field.

0
 
LVL 6

Expert Comment

by:ghassan99
ID: 1119772
I think u r a genius, coz u just proved the creators of Lotus Notes wrong.  Contact Lotus and tell them that u have a function that do that...and register this as an invention.  I rest my case!
0
 
LVL 3

Expert Comment

by:MW
ID: 1119773
I would like to know that function too. I have 985 points to spent. Post your solution and by God, if it works, I'll give them to you valuated with "A". That makes almost 4000 points in one shot!!!!!! The only condition: No 3rd party products have to be involved.


0
 

Expert Comment

by:pab19
ID: 1119774
You can try this to validate if the uidocument has a file
before saving.
But if you checking more than one field it ain't gonna work
Set doc = uidoc.Document
     filecount = 0
     Stop
     Forall field In doc.items
          If field.name = "$FILE" Then
               filecount = filecount +1
          End If
     End Forall
     Msgbox Cstr(Filecount)
0
 
LVL 6

Accepted Solution

by:
ghassan99 earned 400 total points
ID: 1119775
Ok, this is a very interesting workaround I came through as I was browsing the FAQ:
http://www.keysolutions.com/NotesFAQ/howif.html

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question