Simple Agent Required

Hi,

In have over one thousand documents in a database and I have added a computed field to the form which does an @texttonumber on a dialog list field.

This information is then used in a web search to create a URL and pull documents into a view. It does not work as the documents need “refreshing”:

When I open the document in notes, in read mode, I can see the field is there and working, displaying a computed value. If I look at the document properties while in the document, I can see the field and it’s value are there OK.

However, when I come out of the document and look at the document properties from a view, when I try to look at the field properties, the field is not listed.

If I go into the document, edit it and then save it, the field appears.

What is the best way and code to make an agent that opens, edits and then saves each document, if this is what needs to be done.

I have tried creating an agent using the two @commands for edit and save but I get an error saying @ commands not allowed within this search type.

Could someone explain why this is also? Is it to do with the indexer - do I simply need to kick a process off on the server??

Please help as I do not want to go into, edit and save each document ;-))

Thanks,

Matt.

Subject: Simple Agent Required

From designer help…Refreshes the fields of all the selected documents in a view or folder.

Syntax

@Command( [ToolsRefreshSelectedDocs] )

Usage

A database must be open at the view or folder level and at least one document must be selected.

This command does not work on the Web.

Subject: RE: Simple Agent Required

Sorry guys.

Thanks for taking the time to post.

I had checked the help before hand but could not get anything to work.

Anyway, I used your suggestion of @Command( [ToolsRefreshSelectedDocs] ) and put the code into a button within a view.

Selected the documents and it has worked fine.

Just wanted to say thanks a lot.

Matt.

Subject: Simple Agent Required

Sorry to be dense, but what do I do with the @Command( [ViewRefreshFields] ) you suggest.

If I put this in an agent, I get an error message when I try to run it by selecting documents and running it from the actions menu.

I get the message “@commands and other UI functions are not allowed within this search type, please select “None” as your runtime target.”

Please explain in more detail and my apologies and thanks once again.

Matt.

Subject: @Command( [ToolsRefreshSelectedDocs] ) - but please look into the designer’s help before posting (RTFM)