Search DominoPower's 11,441 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
How hide-whens in Rich Text can ruin your whole day (and what to do about it) (continued)

And this time, he's right. It is you.

What's happening?
So what's actually happening? The fundamental thing to understand is that, unlike any other sort of Notes field, the data in Rich Text field can contain its own hide-whens, because that's one of the functions of Rich Text.

Think of a Notes Rich Text field on a form, with a hide-when that encompasses that field. The first time that a document is created with that form, the form's hide-when around the Rich Text field is copied to the data in the Rich Text field starting with at the beginning of the field.

That means that the text in the field itself now contains the hide-when formula. And if you just keep typing into the field, all the text typed in will also be subject to that hide-when.

However, if you then paste some text from somewhere else, say from Word, or Symphony, into the field, the pasted text won't have that hide-when attribute, nor will it inherit it from the text already there.

That's what happened to Janice in the first scenario. Eric had pasted some text from Symphony, which of course didn't have the hide-when on it, and that's the text that Janice can see. You see, once the data has been saved, the hide-when on the form no longer applies to the text in the Rich Text field, only to the elements of the form around the field.

So some of the data in the field is subject to a hide-when that stops Janice seeing it, but the pasted data's internal hide-whens -- or lack of -- says that Janice can see it, so she sees it.

Even though she can't see that piece of the form, Notes will still show the data in the Rich Text field, because the hide-whens are evaluated after the data has been merged with the form for display.

The second scenario is a little different, but just as deadly. Dave pasted some text from another application -- some Rich Text, that also has a hide-when in it -- and those hide-whens are silently and invisibly copied from that other application.

But in this application, that hide-when means that Dave cannot see the text. So once he's saved, closed and reopened the document (remember Notes doesn't revaluate Rich Text unless the document is closed and reopened) it vanishes. Well, it's still there, but the hide-when is hiding it from Dave.

All of this, once you work it out, will probably generate some bad thoughts in your mind, and maybe you'll succumb to a bit of swearing. I'll warrant that once you figure out just how much data has been contaminated by those errant hide-whens, you'll definitely do some swearing, which will be redoubled when you then realise that you can't fix it programmatically. Someone will have to edit each document, check the Rich Text fields looking for hide-whens, and clear them out.

How to avoid the problem
There are ways out of this nightmare in your application design, quite simple ways. If you need to have Rich Text data that's subject to a hide-when formula, then do these two steps instead.

First, put the Rich Text field onto a subform. You'll probably not need to have anything else on the subform, just that one field. No hide-whens, either.


« Previous  ·  1  ·  2  ·  3  ·  Next »
Other articles you might like
Home > Lotus Technologies > Notes (84 articles)
   A walk down Memory Lane with Lotus Notes
   An application for scanning physical mail and distributing it virtually
   Managing Notes deployments with Teamstudio Build Manager
Home > Tips & Techniques (102 articles)
   More about Domino log files
   Why your log.nsf might not be purging properly
   A faster way to repair corrupted server files
Home > Lotus Technologies > Application Development (48 articles)
   An application for scanning physical mail and distributing it virtually
   Little known traps about Lotus Notes fields
   Integrating a Notes Connector database with Google Enterprise Search
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.

The many included activities and demos will make you a pro! Expert instructor help is a click away.

Click here to try a FREE demo course!!

-- Advertisement --

Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.

Register by April 10 to save $200.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login