Solved

View acting strange

Posted on 2006-11-30
5
207 Views
Last Modified: 2013-12-18
Greeting all,

I added a computed field to my form that does an @DbLookup based on the value from another field. I created a new view to show this new field as a categorized column. All the docs show up as Not categorized. However when I open a doc and close it then the vlaue in the columns shows up correctly. Can I replicate this is in a script? I used the agent below and even though i asked that selected documents be processed only the last one gets processed. Would you please let me know where I went astray? Thank you.
0
Comment
Question by:notesrookie
  • 2
  • 2
5 Comments
 

Author Comment

by:notesrookie
ID: 18047542
Agent used:

Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
      
Set uidoc = workspace.CurrentDocument
Set uidoc = workspace.EditDocument( False )
Call uidoc.Close
0
 
LVL 18

Expert Comment

by:marilyng
ID: 18047707
First problem, check the new view index properties on the index tab, and make sure it is set differently from the default.  

Also, check the first tab in the view properties and set it to automatically refresh.

Hmm.. not at home to check the code you posted.. maybe someone else will post.
0
 
LVL 63

Expert Comment

by:SysExpert
ID: 18047908
You need to do a refesh

RE: How to recalculate the computed fields in back end?
Posted by Brad Stickley on 18.Feb.01 at 10:14 PM using a Web browser
Category: Domino Designer -- LotusScriptRelease: 5.0.4Platform: Windows NT


Dim s As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim orderNum As String

Set db = s.CurrentDatabase
Set view = db.GetView("Your View Name Here")
Set doc = view.GetFirstDocument

While Not (doc Is Nothing)
x = x + 1
Print "Now Updating Document # " + Str(x) ' Prints the document Number that is being updated
returnFlag = doc.ComputeWithForm(False,True)
If (returnFlag) Then
Call doc.Save(True,False)
End If
Set doc = view.GetNextDocument(doc)
Wend

End Sub

or there is a @function that wil do this also i R6 and above I think

I hope this helps !
0
 
LVL 63

Accepted Solution

by:
SysExpert earned 250 total points
ID: 18047919
Last Modified: Wed, Jan 13 1999

If you frequently change the design of a form, especially making a few fields computed from editable, you need to know this (maybe you know this already!).

Details

Computed fields on a form won't get computed unless you open the document in the UI and refresh it.  If you have changed the design of a field from editable to computed and if you had a lot of documents already in the database, it is a nightmare to open each document, edit it and save it.   Instead there is a short-cut to recalculate the computed fields.  Here is how:

Create an agent which would run Manually from the Actions Menu / Run Once.  In the formula for the agent, simply use the following @functions:

@Command([ToolsRefreshAllDocs])

or

@Command([ToolsRefreshSelectedDocs])

When this agent is run from the view, the former @Command will refresh all documents in the view and the latter will refresh only the selected documents in the view.
0
 

Author Comment

by:notesrookie
ID: 18048051
Hey SysExpert,

That did the trick. I used the @Command([ToolsRefreshSelectedDocs]) and placed it in an action. Not sure why but I think I tried this in the past and it didn't work very well.

Thank you.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now