|
|
|
|
|
|
|
|
|
|
|
|
|
|
PROGRAMMING POWER
How hide-whens in Rich Text can ruin your whole day (and what to do about it)
By Mick Moignard
Here's one about Rich Text that I've come across more than a few times over the years with Lotus Notes.
You have a need for a Rich Text field on a form, but qualified such that it only appears in certain circumstances. Our natural response is to add a hide-when to the section of the form that the field is in.
This could well be quite a complex hide-when that tests not only @UserRoles values to see what the users access levels to the database is, but also looks at a status field that evaluates part of the application workflow -- just the sort of thing that happens in many Lotus Notes applications.
"You'll definitely do some swearing hen you then realise that you can't fix it programmatically."
|
You test the form, and initially it works just fine. Then you start to see some strange effects: text appears when it shouldn't, or doesn't appear when it should.
I just hope you see weirdnesses in your development testing, and don't find out about it instead from your end users via the helpdesk.
How it might all go bad The effects you'll see could be like this. Eric, who has access to the hidden field, edits some text in it, and then pastes some more in from Lotus Symphony. Yes, Eric is properly up with the times, but Word works -- if that's the expression here -- just as well.
He saves it, and all looks good.
One of his teammates, Dave, who has the same access rights, looks at the data and it all looks good to him too. But then, Janice in the next office, whose access rights to the field as they are implemented in the hide-when mean that she shouldn't be able to see all that text, looks at the document, and she's surprised to see that she can see some of the text -- and she's still in read mode.
She calls Eric, and he's bemused. And so are you, when you go get the call to go and look at it.
Next up is a variation on this. Dave edits another document in the database, and pastes some text into the Rich Text field, text that he's copied from another Notes database. He then changes a status field as part of the workflow, and saves the document.
Then he remembers something he should have and goes back to that document, and is more than a little surprised to find that the text he just pasted in isn't there. He figures he's just had a "senior" moment, and so edits the document to paste the text in again, and finds that he can't even see the edit marks for the field.
That's when he starts to think that the senior moment actually isn't him, but you and your development skills.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- 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. |
|
|
|
|
|
|
|
|
|
|