Lotus notes: create document preview - lotus-notes

In LN 6.5.6 i have a view with a lot of type of documents(with different form and fields) and i want to create a preview mode of that document using:
dynamic form: User select a document and a script compose a form with all fields of that document and open it with DialogBox method. (i must have to create a new form because the database do not cointain any form, forms are in other databases)
OR
dynamic view: User select a document and a script compose a view with all fields of that document and open it.
Is this possible?

Sure, it's possible. Just have the script copy the document to a temporary NSF file that contains whatever forms or views you want, and then bring up the dialog from there. The problems, though, are that when the user exits the dialog they'll find themselves in the temporary database instead of where they expected to be, and you'll probably need a way to clean up the temporary database, too.
Or for the view idea, your script can create a temporary folder with the columns that you want, put the selected document in the folder, and then open the folder. Again, though, the problem is that the user will not really know where he is and how to get back where he was, and you'll have to figure out a way to clean up the temporary folders.
Why not instead just add a form to the database, make it the default form, and just give it all the fields it needs for your previews of the fields you want from documents of different types?

Related

Prevent handling Ctrl+C\V in Lotus Notes database or view

We have a view which gives users an ability to work with documents where we made our own logic for copying documents. It is accessed with a special button on the view. But the standard behavior of copy paste key shortcuts is still there and some users are using it instead and this is breaking some of our logic.
Is there any way to prevent users to copy \ paste documents within Lotus database or at least a certain view?
Yes. If the user don't have author/editor/depositor access they can't paste documents into the database.
You also have the QueryPaste event in the view, you can use that to prevent documents from being pasted in.
In Notes 8.0.2 you also got a new database property (under the advanced tab) called "disable export of view data". You can use that one as well.
There is also a 'disable copy' system field you can apply to any document. If the document contains a field called $KeepPrivate with a value of "1" then document copying is prevented in the client UI. It prevents copying to the clipboard and printing out. It doesn't prevent screen-print of course. It doesn't prevent pasting in either (see paste agents to control that). Readers cannot paste in a document or edit existing data too. You can set/clear $KeepPrivate as needed and $Readers too if necessary.

Get recently read document in Lotus Notes Database

I am developing a database on Lotus Designer 8.5 environment with LotusScript and LotusFormula.
Is there any possibilities on get a list of recently opened documents (for example last five) in a Lotus Notes database ? My purpose is to provide an embedded view showing the recent documents opened by current user on the current database, which will act like some kind of history view.
Please advise
Use a folder categorized by username. Add the current document in PostOpen event to folder with document.PutInFolder(folderName) and remove the oldest document from folder with document.RemoveFromFolder(folderName)
This way you don't need to edit the documents and can show the last visited documents for a user in an embedded view.
As an alternative you can use user specific folders with option "Shared, private on first use".
I have that functionality in one of my databases.
I just added some code in the QueryOpen event of the form to store the UNID of the document in a profile document linked to the specific user. The values are stored in a multi value field, and my code removes the oldest entry when the number of entries I want to store is exceeded.
The user can actually set that number themselves in teh applications settings, 5 is default but they can make it more or less.
I built a class for this, makes it very easy to modify later, and to implement it in different forms, for different document types.
I then built a method to expose the last documents to the user, using a dropdown box as you can see below. Since you only wwant/need the five (or perhas ten) last documents, no need to use a view.

Unable to auto assign Document properties from Document Set shared columns

I have a SharePoint document library I am working on. It has a list of document sets. Each document set has a few fields that are marked as "Shared" so that they can be inherited by the documents inside.
When I upload a document inside a form opens and all the fields on the form are pre-filled with the shared values of the corresponding columns. But when I use create document from template, it opens the template in the corresponding Office application but the document property fields are empty and not read-only which is against the requirements of this project. I require them to be synced and filled exactly like when a document is uploaded.
There is one thing though. The user can fill any value he wants in those fields and they will still be saved a synced copy from parent in the library discarding what the user filled in, which is good, but why not show those values up in the document in the first place?
Anyone has experience in handling this please help. I have searched a lot on the internet but either my keywords are wrong or no one has had this problem before.
SharePoint version: 2010 Server
Office version: 2010 Professional
It sounds like you need a simple event reciever, which fire on itemadded. It would then go back up the tree to find the document set. Capture which properties are marked as shared. Adjust the item that is being added to force the values.
Probably 8 lines of code

How to create Lotus form to both enter data and display the same information (Lotus Designer)

Very new to Lotus designer.
I am trying to create a simple form with a field which is updated from time with additional information. I want the admin user to be able to update this information on the same form interface as the user viewing the information.
It appears I do not really understand how to get the form to display information entered into it previously.
I did Ctrl+shift view of the database and saw all the previous entries but I can not seem to get the form to display these information as well as allow me to append to them.
Kindly help.
Thanks.
Have a look at the online Domino Designer help - for instance the sections on designing forms:
http://publib.boulder.ibm.com/infocenter/domhelp/v8r0/topic/com.ibm.designer.domino.main.doc/H_ABOUT__FORMS.html
A form is used to create a new document or to edit an existing document. Since you say that you can see the previous entries, you must be creating a new document for each entry.
If you want to see and modify the contents of an existing document, you have to navigate to the document and open it for edit.
If you want the user to see a list of all the previous documents while he is creating a new one, you can add an embedded view to the form and use that to display data from the previous documents.
If you want all the information to be in a single document, then you need to stop creating new documents and just select the exiting document, open it for edit, make your changes, and re-save the document.

How to save a word template for a content type without filling in required fields

I have a content type that has required fields. I have associated Word document with the content type as a template. I now want to edit the Word template, but word won't allow me to save the template without filling in the required fields. However, if I fill in the required fields and save the document, then those fields get populated with my values when you create a new document. This isn't good because I want the fields to be blank when a new document is created - I want the users to be forced to fill in those values.
I can update the templace by updating the colums and making them optional, editing the word template, saving the template & then changing the columns back to required. This is a PITA - there's got to be a better way, does anyone know what it is?
I've been using this work around: When I edit the template (ie go to the content type settings --> Advanced settings --> Edit Template), I make my changes and save the file locally. Then, on the same page that I clicked the "Edit Template" link, I upload the copy that I saved locally. Saving it locally avoids the validation that happens when you try to save it back to SharePoint. But the validation still gets applied to any new documents of that content type. So no need to toggle the settings off & on! :)
Have you tried saving the document as a normal document content type, making the changes, saving it, then moving back over the top of where the old version of the template was?
The only solution I've found is to modify document templates on library level. Just upload a new document template for the required content type.
However, this will not work if you'd like to re-use one and same content type across different document libraries.

Resources