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

« Why Is the Last Line in the NOTES.INI Not Taking Effect? | Main| Book Review - Babylon Rising »

How to Fix Old Documents That Have "Store Form in Document" Selected

Category Software Development

This issue will definitely come up at a client I'm doing work for...  I'll stick it out here in my blog to make sure I have it when I need it.  From the KnowledgeBase...

How to Fix Old Documents That Have "Store Form in Document" Selected

Document Number:  1084841

Problem
Changes to a form do not affect previously composed documents if the form uses Store form in document.  That is, older documents in the database do not reflect the new Form changes.  How can you update the documents to reflect changes made to the form?

Content
To update existing documents that were created with the Store Form in Document form option with a new form design, follow the steps below.   Note:  These steps are also effective for forms which contain subforms.

1.        Create an agent with the following settings:
-        When should this agent run:   Manually from the Action Menu
-        Which document(s) should it run on?:   All documents in the database
-        Formula:
SELECT $TITLE="Form Name";
FIELD $TITLE:=@DeleteField;
FIELD $INFO:=@DeleteField;
FIELD $WINDOWTITLE:=@DeleteField;
FIELD $BODY:=@DeleteField;
FIELD FORM:="Form Name";

Note:        If the form has an alias then the alias name should be specified rather than the form name.

2.        Refresh the affected documents.
Notes 5.x & 4.x does not have a menu option to execute Tools, Refresh Fields.  You must create a SmartIcon that executes the @Command for either "ToolsRefreshAllDocs" or "ToolsRefreshSelectedDocs".   (The "ToolsRefreshSelectedDocs" command is preferred when you need to update only certain documents, but you need a method to select those documents (such as a view with a selection formula).)

        Steps to create a SmartIcon that executes the "ToolsRefresh" command:

a.        From the menu, select File, Tools, SmartIcons.
b.        Select "Edit Icon."
c.        Scroll to the end of the icon list.
d.        Select an icon labeled "Macro Button."
e.        Edit the description field to read "ToolsRefreshSelectedDocs" or "ToolsRefreshAllDocs".
f.        Select Formula.
g.        Select "Add @Command."
h.        Select either "ToolsRefreshSelectedDocs" or "ToolsRefreshAllDocs."
i.        Select Paste.
j.        Select OK.
k.        Select Done.

Comments

Gravatar Image1 - I once ran this very agent on a database. If the database is big you will want to schedule the agent on the server over a weekend. It can take quite a while to run. I vastly underestimated the amount of time it would take to run. In my case I started it on Friday and it wasn't done by Monday morning refreshing a doc is the same as doc.computewithform if you're familiar with the performance of that lovely function, you'll have a good idea of what you're in for.

Gravatar Image2 - Thanks, this little snippet of code is very much appreciated by this Notes novice...

Gravatar Image3 - What in case of 6.x version? I tried the same techinique but does not work.. Help me ..

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