
Hi, I am trying to export the search results (from the agent area) to a file. I need all of the information regarding a ticket that shows up in the result. I tried few things so far. 1. SystemStatsGeneric.pm (Kernel/Module) https://myotrshost/index.pl?Action=SystemStatsGeneric&CSV=1 This had a SQL query __START CODE___ my $CSVFile = 'csv-file'; my $SQLLimit = 5000; #my $SQL = qq|SELECT * FROM system_user|; my $SQL = qq|SELECT * FROM search_profile|; my $Group = 'stats'; ___END CODE__ Can I create my own query here and generate a file. I tried all from search_profile table. But that only has profile_key. I need the body of the article. 2. There was a similar thread few weeks ago. From that I gathered I need to add this piece of code in my Config.pm ___START CODE___ # AgentUtilArticleTreeCSV # export also whole article tree in search result export # (take care of your performance!) # [default: 0] $Self->{AgentUtilArticleTreeCSV} = 1; # AgentUtilCSVData # (used csv data) $Self->{AgentUtilCSVData} = ['TicketNumber','Age','Created','State','Priority','Queue','Lock','Owner', 'UserFirstname','UserLastname','CustomerID','CustomerName','From','Subject', 'AccountedTime','TicketFreeKey1','TicketFreeText1','TicketFreeKey2','TicketFreeText2', 'TicketFreeKey3','TicketFreeText3','TicketFreeKey4','TicketFreeText4','TicketFreeKey5',' TicketFreeText5','TicketFreeKey6','TicketFreeText6','TicketFreeKey7','TicketFreeText7', 'TicketFreeKey8','TicketFreeText8','ArticleTree',''] ____END CODE___ I guess I can add different field names above and get desired output. How can I tell which tables are these fields coming from? And how do I generate the CSV? Can I URL like my other example: https://myotrshost/index.pl?Action=SystemStatsGeneric&CSV=1 Thanks. --Sharif