Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2004-08-31
6
192 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Capture Serial Data in Lotus Notes Database 8 269
Lotus notes email code 6 116
Lotus notes VB code 4 209
IBM Lotus notes 9 100
For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

860 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