0
votes

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?

1

1 Answers

1
votes

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?