Want to get rid of Google Ads, click here.
+ Reply to Thread
Results 1 to 8 of 8

Thread: Need Help - Posting from the Clipboard in SC.

  1. #1
    Junior Member
    Join Date
    Jul 2007
    Posts
    12

    Default Need Help - Posting from the Clipboard in SC.

    Alright all you ServiceCenter gurus, I need help in a major way. Here is my issue : I am looking for a way to use a Display Option that will call a block of Javascript and / or a RAD function that has the ability to capture the last posted item on the local clipboard and paste that info back to a field in SC. My question here is : Is this even possible? and if so, where do I even begin with this? Thanks in advance for any help!

  2. #2
    Member
    Join Date
    Oct 2006
    Location
    USA
    Posts
    42

    Default

    Client side JavaScript allows to copy/paste from clipboard, but SC supports only server side JavaScript. Hence I don't think it's possible in SC.

  3. #3
    Senior Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    930

    Default

    The only option I see is using DDE, and call that DDE script via the DisplayOption (similar to the CTI integration).

  4. #4
    Junior Member
    Join Date
    Jul 2007
    Posts
    12

    Default

    Yeah, I'm definitely going to go the DDE route. Now, here's what has to happen : There is an external knowledge Base called Authoria where users click a "Log Answer" button and a block of text underneath that button is to be logged into SC. To the best of my knowledge, this Log Answer button calls a .xsl file that i turn invokes a VBScript where the DDE calls into SC will be done. I have two questions for all of you now:

    1.) Is there a dll/ActiveX control that will have to be packaged along with this VBScript in order to Log that text from Authoria into SC (this will be done with client side logging)?

    2.) Is there any documentation at all as to the different possible DDE calls that can be made into SC? Basically, I will need a way, with VBScript to make some DDE calls into SC to log the text into a field on the current form displayed on the user's screen. Do any of you have an example of the VBScript code that I would have to use in order to accomplish this task? If not, is there any documentation that any of you may know of that may detail DDE calls into SC?

    Thanks in advance for any help. I don't have much experience with this and I need to learn it fast!

  5. #5
    Senior Member
    Join Date
    Jan 2002
    Location
    The Netherlands
    Posts
    930

    Default

    Not got examples, but we've done similar things in the past.

    In (some) answer:
    1. Nope. The client is "prepackaged" with DDE support.

    2. The Help actually contains some valuable information. You bascially have two types of DDE communication (CTI type integration and knowledge mgt type integration). The first is an "interaction" definition (SystemEvent) aimed at incoming DDE calls with a create/update action. When the function called from this DDE exists in this table, the corresponding RAD application is called. The second is poking SC from your script, which is aimed at a "screen" level interaction (like macro's).

    This last one seems the most likely for your approach.

    An example (from the help file):

    Code:
    The following example, written in VBA, illustrates a DDE script that takes a user directly to the
    Database Manager from the login screen. Before executing this script, you must be on a ServiceCenter login screen.
    
    Sub SC()
    	Dim nChannel As Long
    	Dim strReturned As String
    	nChannel = DDEInitiate("ServiceCenter", "ActiveForm")
    	DDEPoke nChannel, "$user.id", "falcon"
    	DDEExecute nChannel, "[Transact( ""0"" )]"' login
    	DDEExecute nChannel, "[Transact( ""1"" )]"' go to the command interface
    	DDEPoke nChannel, "$command", "db"' go to the Database Manager
    	DDEExecute nChannel, "[Transact( ""0"" )]"
    	DDEExecute nChannel, "[SetFocus( ""file.name"" )]" ' set the focus in the file name box
    	DDETerminate nChannel
    	End Sub

  6. #6
    Junior Member
    Join Date
    Jul 2007
    Posts
    12

    Default

    Harn, you're definitely right with that statement. I have seen this example in the SC help and now I am trying to find some documentation on the various DDE calls that can be made into SC using an external script. The example you have given gives me hope that there is a way to do this task yet. At this point however, I am really reaching for anything that can help me figure out what exact calls need to be made in SC in order for this thing to work. Is this a question for HP? Especially in the face of their knowledge base being somewhat disfunctional?

  7. #7
    Junior Member
    Join Date
    Jul 2007
    Posts
    12

    Default

    I have been trying this VBA script as a generic test script :

    Sub SC()
    Dim nChannel As Long
    Dim strReturned As String
    nChannel = DDEInitiate("ServiceCenter", "ActiveForm")
    DDEPoke nChannel, "description", "test"
    DDETerminate nChannel
    End Sub

    I also have an open interaction in SC sitting on my desktop and as one can see from the example script above, I am trying to push the text "test" into the description field on this open ticket. I have tried running this test script in a VBA project in Excel, but am getting errors. So, my question now is how can I successfully test this script to get the text "test" to push into the description field on my currently open intercation ticket in SC?

    Thanks for any help!

  8. #8
    Senior Member
    Join Date
    Jul 2006
    Location
    San Francisco, CA
    Posts
    172

    Default

    Quote Originally Posted by Bison9 View Post
    Sub SC()
    Dim nChannel As Long
    Dim strReturned As String
    nChannel = DDEInitiate("ServiceCenter", "ActiveForm")
    DDEPoke nChannel, "description", "test"
    DDETerminate nChannel
    End Sub

    Thanks for any help!
    Well, I can't really help with the DDE piece, but if you're trying to write data to the description field, since it is a character array shouldn't the text being posted be formatted as {"test line 1","test line 2"} rather than as a scalar value? Or, as an alternate approach, post "test" to description,1?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts