About Duffbert...

Duffbert's Random Musings is a blog where I talk about whatever happens to be running through my head at any given moment... I'm Thomas Duff, and you can find out more about me here...

Email Me!

Search This Site!

Custom Search

I'm published!

Co-author of the book IBM Lotus Sametime 8 Essentials: A User's Guide
SametimeBookCoverImage.jpg

Purchase on Amazon

Co-author of the book IBM Sametime 8.5.2 Administration Guide
SametimeAdminBookCoverImage.jpg

Purchase on Amazon

MiscLinks

Visitor Count...



View My Stats

« Lotus Domino -- Aging Gracefully? | Main| U-Haul customer service gets my "Hall of Shame" award... »

Refreshing hide formulas on view action buttons... any leads?

Category IBM/Lotus
I have a routine in an application that marks a view of documents as "locked" or "unlocked" when the view action button is clicked.  There's a "Lock Documents" and an "Unlock Documents" button at the top of the view.  Each one is hidden based on a @DbColumn command that looks at the value of the Lock column in a view.  Since it's an "all or nothing" lock, the appearance of the lock hides the Lock Document action, and the lack of a lock hides the Unlock Document action.  After I run the LotusScript agent attached to the action button, I have the view do a refresh so that the lock icon shows up.  

All the stuff above works fine...  Except for one tiny nit...

Once the Lock Documents agent finishes, I'd like to have the hide formulas in the view action buttons be reevaluated.  It'd be great to have the Lock Documents button disappear and have the Unlock Documents button replace it.  The only way it happens now is to exit the view and go back in.  When you reenter the view, the buttons obviously refresh and all is as it should be.

I've tried a number of combinations of methods of NotesUIView, NotesUIDatabase, and anything else that looked promising.  But in the end, I couldn't manage a refresh on the view action button hide formulas.

Any ideas from the accumulated wisdom of Notes gurus out there?

UPDATE:  Declan gets the "free beer" award for pointing me to a view property that I was unaware of...  works like a charm!

Comments


Gravatar Image2 - Declan... you freaking ROCK!!! You may redeem your free beer coupon any time between January 20th and January 26th.

Thanks so much!

(Rob... I'll go *get* you a beer between those same dates... reward for effort. :) )

Gravatar Image3 - ...and I thought Declan was an admin. Nice!
I've got a free beer for anyone who can tell me why docs won't unlock on their own. I've got a database that I enabled doc locking. Everyday, I have to review the database to see if some docs have not unlocked from the previous day even though the user has closed them. Tough to troubleshoot. We're on 6.5.5. I bet it's a bug that's been fixed in a later release. It's a question I intend to bring to the Lotusphere Lab.
Cheers.

Gravatar Image4 - Did you try the various @formula refreshes as well? @Command([RefreshHideFormulas]) sure sounds like it should work. Which doesn't mean it does. heh. There's also RefreshWindow and ReloadWindow, though.

And I assume the uiworkspace.reloadWindow didn't work (or ws.ViewRefresh - you didn't mention checking the workspace methods)?

Gravatar Image5 - There is a view property that you can set to re-evaluate view action buttons when a document changes. It's on the second tab and is called 'Evaluate Actions For Every Document Change'.

Gravatar Image6 - Rob... I didn't try @Formula because I'm using LotusScript for the code in the action buttons. And yes, I tried NotesUIWorkspace along with all your variations mentioned. :)

Declan... Didn't know about that view option... Let me give that a try.

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::lips::rolleyes:;-)

Want to support this blog or just say thanks?

When you shop Amazon, start your shopping experience here.

When you do that, all your purchases during that session earn me an affiliate commission via the Amazon Affiliate program. You don't have to buy the book I linked you to (although I wouldn't complain!). Simply use that as your starting point.

Thanks!

Thomas "Duffbert" Duff

Ads of Relevance...