Manage Learn to apply best practices and optimize your operations.

Deleting selected docs on Web

Domino does not do everything you need it to for the Web. Therefore, Domino developers have to rely on HTML, JavaScript and other web programming methods. However, using Embedded view and little bit of HTML, we can do some nice Web work using Domino.

First, create a column in the view and give the following formula in the column.

uid:=@Text(@DocumentUniqueID); "[ <INPUT TYPE="checkbox" name="Selection" value=""+uid+"" >]"

It shows the check box and when users select the check box, it sets the unique ID in a field called 'Selection' on the form (where the view will be embedded).

Create a form and embed the above view. Go to embedded view properties and select 'using HTML' for web access property. Then create a computed field called 'selection and allow multiple values.'

Create a Lotus script agent 'delete documents' and paste the following script in the agent Dim session As New notessession Dim db As notesdatabase Dim doc,doc1 As notesdocument Dim doc2 As notesdocument Dim item,item1 As notesitem Set db = session.currentdatabase Set doc = session.documentcontext Set item = doc.GetFirstItem( 'Selection' ) Forall v In item.Values     Set doc1 = db.getdocumentbyunid(Cstr(v))

    Call doc1.remove(True)

End Forall

Specify the agent name in the web query save event of the form.

Now open the form in the browser and select the docs by using the check boxes provided and submit it.

You have to submit the form then the agent will pick up the unids of the docs and delete them one by one. You can use the same method for updating the selected docs also.

It took a fair amount of time and help from my seniors to do it. I hope Domino developers will find it useful.

Dig Deeper on Domino Resources - Part 3

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close