0

Follow up by my Question here about doing a version tracking and show responses I have another question. I have a PC Specification view. What I want to do is, when I want to do a Specification for all PC, I will create something like a draft for all PC as a new document. After it all save, the draft/new document with edited will be as updated data and show as the current document, and old document data will be stored as archived.

Is there any function for me to do that? Should I create a "form" page named "ARCHIVED" and save all document there for review? OR is there any session function or anything?

I have found this link example archive with delete but it needs to create a new database. Do I need to create a new database for the archive?

Any help will be appreciated. Thanks!

Per Henrik Lausten
  • 21,331
  • 3
  • 29
  • 76
Reinhaa
  • 195
  • 1
  • 17

1 Answers1

1

You could create a status field. for example "DocumentStatus" as text or radio and set it to wathever you like. I prefer alias values like

"0" -> draft     
"10" -> active document  
"20" -> archived 

Then you are able to filter in views with SELECT .... & DocumentStatus="20" to only show the archived documents

umeli
  • 1,068
  • 8
  • 14
  • I've tried this and it's okay. I have a question. What if I want to make all document be draft at the same time, and during that, document can't be edit. And I click save, all draft document will be saved at the same time. Do I need to create Agent for this? Thanks! – Reinhaa Mar 27 '19 at 04:26
  • Hi, I have a question. Before this, I create a version tracking that will show all the edited document inside view. For this question and based on your suggestion, how am I gonna automatically set all edited send to archived? For example, I edit a live document and save it as an active document, then how am I gonna set the old document to archived? Do I need to edit after that? – Reinhaa Mar 27 '19 at 07:36
  • If you use the versioning, then all versions are response documents. There's a response document collection in the parent document available. So you should be able to update all the responsedocumetns in postsave event. – umeli Mar 27 '19 at 10:19
  • So I need to create a postsave event inside Agent? Does [this](https://www.ibm.com/support/knowledgecenter/SSVRGU_8.5.3/com.ibm.designer.domino.main.doc/H_EXAMPLES_POSTSAVE_EVENT_4285_EXAMPLES.html) link apply? – Reinhaa Mar 28 '19 at 02:04
  • The "postsave" is more like "after you have saved the main document", either directly in the Forms postsave event or if you already have an agent, you can also include it in there. – umeli Mar 28 '19 at 14:47