Solved

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

Posted on 2004-08-31
6
189 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:Jaziar
Comment Utility
I was sure wrong about this one.
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 150 total points
Comment Utility
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
Comment Utility
sounds like a plan - I will give it a try
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now