Service Desk Practitioners Forum
cancel

Smart ACTIONS - ovsd 4.5 SP21

SOLVED
Go to solution
Highlighted
aaron afilalo
Respected Contributor.

Smart ACTIONS - ovsd 4.5 SP21

Can I create a Smart Action that opens a new Word or Notepad document and fills it with specified Service Call fields.
Smart actions seems to give you the option to do this. But when I run the Smart Action, Word or Notepad opens but with error messages and the fields specified do not appear.

In Notepad, the value of the inserted field becomes the Notepad filename.

In Word the error is: The document name or path is not valid.

Can SD4.5 do what I am asking of it. Am I missing specific parameters before specifying the inserted fields in the Smart Actions definition screen??

Thanks,
Aaron
8 REPLIES
Craig R Taylor
Honored Contributor.

Re: Smart ACTIONS - ovsd 4.5 SP21

I've been toying with this idea myself for quite some time. I just thought of a possible approach.

If your smart action were to just echo the contents of a field and pipe the output to a text file it could possibly work.

E.g.
echo frogs are grand > test.txt

This line would create a new file test.txt The contents would be "frogs are grand". Of course you could use an actual field rather than this text.

Just an idea anyways...
You can observe a lot just by watching. - YOGI BERRA
Craig R Taylor
Honored Contributor.

Re: Smart ACTIONS - ovsd 4.5 SP21

oops! I meant type rather than echo.
You can observe a lot just by watching. - YOGI BERRA
aaron afilalo
Respected Contributor.

Re: Smart ACTIONS - ovsd 4.5 SP21

Craig,

Tried your suggestion. Seems that any text or fields in the Parameters box of the smart action causes the same error message. That's why I am thinking the system needs some initial parameter... though I may be wrong - it's happened before..ask my wife.
Craig R Taylor
Honored Contributor.
Solution

Re: Smart ACTIONS - ovsd 4.5 SP21

All right. It IS echo not type.

Just looking at it quick

Created a new application called command
(the command is c:\windows\system32\command.com)

I created a new smart action called echo

parameters were something like this:

/c echo [Information] > test.txt

It creates the file "test.txt" on the client box. I think if you run it as a system action it runs on the server.

Anyways...
You can observe a lot just by watching. - YOGI BERRA
Darren McGiffen
Honored Contributor.

Re: Smart ACTIONS - ovsd 4.5 SP21

Aaron,

the Smart actions within OVSD are dependent upon the application you are running.

OVSD has the ability to parse this information as though it is on the command line.

that is, if you can do it on the command line, then you can do it in a smart action. the parsed information is treated as text.

hope this info helps
aaron afilalo
Respected Contributor.

Re: Smart ACTIONS - ovsd 4.5 SP21

Craig,

Thanks for your help, your suggestion definitely works. But formatting is an issue. In the end I guess my question remains, can this be done in Word?

Darren,

Thanks also. I get the impression from your comments that a Smart action is really DOS commands (for my needs) run from within OVSD. So whatever I can get DOS to do, Smart action can replicate.

Thanks again.


Jan Schepers
Super Contributor.

Re: Smart ACTIONS - ovsd 4.5 SP21

To be able to do formatting I use the Service Pages. By creating a special jsp that can be called call from within an action (by starting the web browser and going to the url) you can format using html.
By changing the http response content type and header as follows:

response.setContentType("application/msword");
response.addHeader("Content-Disposition","attachment;filename=ReceiptOfEquipment.doc;");

the browser will suggest you to download the file or open it in word. In attachment a full jsp example.
aaron afilalo
Respected Contributor.

Re: Smart ACTIONS - ovsd 4.5 SP21

thanks to all