Welcome to the #dominoforever Product Ideas Forum! The place where you can submit product ideas and enhancement request. We encourage you to participate by voting on, commenting on, and creating new ideas. All new ideas will be evaluated by HCL Product Management & Engineering teams, and the next steps will be communicated. While not all submitted ideas will be executed upon, community feedback will play a key role in influencing which ideas are and when they will be implemented.
For more information and upcoming events around #dominoforever, please visit our Destination Domino Page
@OP - You don't want to loop through the documents in the view while you update the same documents. Like others already mentioned, you can use the AutoUpdate property of the NotesView class to prevent view updates while you are processing the documents, but my code is safer, since it is just getting the UNID of all documents in the view, then processing them without using the view anymore.
Why should HCL implement a function that is really not needed, just because you don't have the ability to write code using exiting functions? Would not their time be better spent on creating actual new functionality?
I understand your code, but do you think dc=view.alldocuments is simple for us ?
This is trivial.
Loop through the view collection and store all documents in a list, or at least the DocUNID. Then you can process all the documents in the list without any issues.
Something like this:
In this case view.autoupdate=False doesn't work as expected , I described.
Put view.autoupdate=false before you start doing your updates. This prevents the view from changing.
change it to true when done.
Designer help link
works perfectly!
No!
I know document pointer is changed at field update, so I keep document as you described, but this issue will occur.
Please try yourself !
Common problem. The way around this is to get a handle on the next document (eg doc1) in the view before starting your loop. After processing the first document (eg doc), pass the doc1 handle to doc (if it isn't nothing otherwise your loop has finished) and then get the new next document before repeating the loop.