Solved

Simple - editing a action button to show up on the web

Posted on 2004-08-31
6
191 Views
Last Modified: 2013-12-18
On my client side database, I have a action button placed with in a table.  The action itself is a lotus script.  I need for the action button to now show up on the web side as well.  I think it has something to do with the HTML tags - not sure
0
Comment
Question by:Jaziar
  • 3
  • 3
6 Comments
 
LVL 31

Expert Comment

by:qwaletee
ID: 11945789
LotusScript buttons don't work on the web.  You'll have to convert it to work differently.  What does the button do?
0
 

Author Comment

by:Jaziar
ID: 11946090
Sub Click(Source As Button)
      Dim session As New NotesSession
      Dim uiDoc As notesUiDocument
      
      Dim doc As NotesDocument, dialog As NotesDocument
      Dim ws As New NotesUIWorkspace
      Dim s As New NotesSession
      Dim db As NotesDatabase
      Set db = session.CUrrentDatabase
      Set dialog = db.CreateDocument
      Set uiDoc = ws.currentDocument    
      flag = ws.DialogBox( "Disc", 1,1, 0, 1, 1, 0, "title", dialog)
      If Not flag Then Exit Sub
      
      Dim comment As String
      Dim recipient As Variant      
      comment = dialog.DiscComment(0)
      recipient = dialog.DiscSendTo(0)
      Dim message As notesDocument
      Set message = db.createDocument
      message.Form = "Memo"
      message.Subject = "Discussion Thread from database " & db.Title & " - SPR Number " & uidoc.Document.LexECRNum(0)
      Dim rtitem As notesrichtextitem
      Set rtitem = message.createrichtextitem( "Body" )
      
      Call rtitem.AppendDocLink( uidoc.document , "link to document" )
      Call rtitem.AddNewLine(2)
      Call rtitem.AppendText( COMMENT )
      message.SendTo = dialog.DiscSendTo
      message.Send False
      
      Set uidoc = ws.currentDocument
      Dim Discussion As String
      Dim history As NotesItem
      Set history = uidoc.document.getfirstitem( "Discussion" )
      If history Is Nothing Then
            Set history = uidoc.document.replaceitemvalue( "Discussion" , Now & " From " & s.commonuserName & Chr$(13) )
      Else
            history.AppendToTextList Now & " From " & s.commonuserName & Chr$(13)
      End If
      history.AppendToTextList "------------------------------------------------------" & Chr$(13)
      history.AppendToTextList COMMENT & Chr$(13)
      history.AppendToTextList "======================================================" & Chr$(13)
      
' save it in the backend, but update changes
      Call uidoc.document.save(True,True)
      Call uidoc.reload()
      
End Sub
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 11946456
Jaziar, I didn't really want all the code, just a fnctional description!

It looks like your button pops up a UI to send a message.  What you will want to do is adapt the "Disc" form so that it can display on the web, and so that when it is submitted from the web, it sends an e-Mail.  The button will have to have two versions, one for Notes, one for the web.  The web version should launch the Disc form in a new browser window, perhaps passing enough info to it so that it knows where it was called from.

That's the conversion for the first part of the LS button.

The second part appends the user name, time, and comment text to the main document.  To take care of that, you can handle it one of several ways:

1) If the history field is editable, then the Disc popup can use a bit of Javascript to pass the comment back to the editable field of the parent window

2) If it is not...

    2a) instead of calling the comment in a pop-up window, have the main window submit with a hidden flag field.  The query save for the form can recognize the flag, and redirect the user after save to the ocmments form, and teh comments form processing on submit can both send the message and update the original document's history field

    2b) you can add an editable field that is hidden from Notes and uses teh wbe attribute TYPE=HIDDEN, to hold the tenporary comments.  Then, as in (1), the commen form before submitting passes the comment back... to this hidden field.  Upon submission of the main form, the ocntent of the hidden field is appended tp the main hostory field, and the temporary field is cleared.

And you thought this would be simple?!
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

Author Comment

by:Jaziar
ID: 11952676
I was sure wrong about this one.
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 150 total points
ID: 11957106
You know what?  You could build a much simpler interface for the web.  Just put in an editable field on the main form to type in the comments.  The button will just unhide the field.  Your web query save agent will just move the content from the input field to the history field, send the message, and clear the input field.
0
 

Author Comment

by:Jaziar
ID: 11957576
sounds like a plan - I will give it a try
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question