Service Desk Practitioners Forum
cancel

Output sd_dataform results to file

Highlighted
Eric Larsen_2
Valued Contributor.

Output sd_dataform results to file

Is there any way that sd_dataform can be made to send its results to a file, instead of displaying them. If not, are there any other programs that exist on a Service Desk client PC that will allow me to output results of an OpenView query to a file? I am not an OpenView admin, so it would have to be something that is accessible by a regular user, like sd_dataform is.
6 REPLIES
Ganesha Sridhar
Outstanding Contributor.

Re: Output sd_dataform results to file

Hello,

We are pushing the detail of an Incident into a CSV file. This we are doing by invoking the DB rule. The attribute values are sent as parameter to shell script and is echo'ed into the CSV file.

Here is the script:
#----------------------------
#!/bin/sh
#OVSD INPUT PARAMATERS
#,,


#TYPE
type=$1
shift
#ID
id=$1
shift
#DESCRIPTION
desc=$1

#Construct the output filed
outputstr=$type,$id,$desc

echo $outputstr
echo $outputstr > /tmp/ovsd_output/ovsd.csv

#-----------------------------------------


HTH
Regards
Ganesha Sridhara

Robert S. Falko
Acclaimed Contributor.

Re: Output sd_dataform results to file

Eric,

The standard mechanism in OVSD to output a query result to a file is to use the File
-> Export command.

You can also write a script called via a UI rule that will write to a view.

I am not aware of any standard OVSD client application that does precisely what you want.

-Josh
Eric Larsen_2
Valued Contributor.

Re: Output sd_dataform results to file

Ganesha,

As I said, I am not an OpenView admin. I don't understand some of the terminology you're using, and have no idea how to use the script you gave. What type of file do I save it as (file extension)? What is the exact command line that I would use to run it from a client PC (the script must be able to reside on and be run from a ServiceDesk client PC)? Also, some more details on what each of the parameters in the script mean, would be helpful



Josiah,

You said I "can also write a script called via a UI rule that will write to a view". Again, this terminology doen't mean anything to me. How exactly do I do this (an actual script would be helpful), and how do I run it from a client PC?
Mark O'Loughlin
Acclaimed Contributor.

Re: Output sd_dataform results to file

Hi Eric,

you could look at usig "sd_export.bat" utility from the bin directory to export the data.
Eric Larsen_2
Valued Contributor.

Re: Output sd_dataform results to file

I tried that before. I could never find enough understandable information in the Forums or elsewhere to get it to work. If you have some specific examples (hopefully with detailed explanations) on queries that use this, I would like to see them.
Eric Larsen_2
Valued Contributor.

Re: Output sd_dataform results to file

Anybody got anything on this?