export set not creating file

kjmauriello
Mega Expert

I have created an export set that queries the incident table.

I have the export target set to a location that the "run as" user and the mid server has access to.   When I test connection it returns successful.

When I run the export set a file is created in the sys_attachment table with the defined name in the export set and has the data I am expecting.

However, the file is not saved to the location requested.

Locations attempted:

        \\FENetwork.com\data\grp\SMIP\

        U:\grp\SMIP\

FENetwork\data is the network drive

U is the drive letter assigned to FENetwork\data

Seems pretty simple, but I must be missing something.

Any assistance would be greatly appreciated

4 REPLIES 4

martygrinstead
ServiceNow Employee
ServiceNow Employee

Hi Kevin,



Export Sets only write data under the ./agent/export directory.


When you create the export set, the path you provide for the output file is relative to ./agent/export.



On the Export Target page, there is a tip that shows (in part):


"File path will be relative to the directory where the MID Server Agent has been installed and within the 'export' directory.


For example on a *nix machine: /servicenow/mid_server123/agent/export/{file_path}"



My suggestion is to start by creating a file in the export directory (don't specify a path) and make sure it really does create the export file, then you can start working with the specific directory (keeping in mind that it must go under the export directory).     You may be able to play with symbolic links once you get the file created, but that's really outside of the export set functionality.



Regards,


Marty


It is creating the file, after further investigation I believe I need to create a mid server script include to copy that file to the final destination folder.


Hi Kjmauriello,

 

I have created export definition, Export target and export set to send file to a location in mid server and below are the configurations I made.

 

Mid server name : abc

 

Folder path I requested: abc/agent/export/test

So, I need to send multiple reports to a folder test shown above. In export target, I added /test in the file path field, and when I tried by exporting 20 records I don't see any file created in test folder.

Is there anything I'm missing in the above process. Also, just want to know which user need to have write permissions to create a files in test folder.

 

 

Thanks in Advance!!

Teja

 

 

@kjmauriello 

I have the same requirement as yours, can you please send me the script of  script include to copy that file to the final destination folder.?