|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 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. |
|
|
|
|
|
|
|
|
|
|