Quantcast
Viewing all articles
Browse latest Browse all 2504

QueryCSV returns same row multiple times (2 Comments)

Topic by Tushar Kapadi

Hello,

I am using QueryCSV to fetch Contact information from RightNow but it returns me multiple rows for the same unique Id.

How can i make RightNow return only one row for one Id that includes all the fields:

Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="urn:messages.ws.rightnow.com/v1_2">
   <soapenv:Header>
      <v1:ClientInfoHeader>
         <v1:AppID>1</v1:AppID>
      </v1:ClientInfoHeader>
   </soapenv:Header>
   <soapenv:Body>
      <v1:QueryCSV>
         <v1:Query>select C.Id, C.ParentOrganization.CustomFields.CO.party_id, C.ParentOrganization.CustomFields.CO.customer_number, C.Title, C.name.first, C.name.last, C.Organization, C.Emails.EmailList.Address, C.UpdatedTime from Contact C where UpdatedTime > '2013-07-01T08:07:30Z' order by Id</v1:Query>
         <v1:PageSize>100</v1:PageSize>        
      </v1:QueryCSV>
   </soapenv:Body>
</soapenv:Envelope>

 

Response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header/>
   <soapenv:Body>
      <n0:QueryCSVResponse xmlns:n0="urn:messages.ws.rightnow.com/v1_2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <n0:CSVTableSet>
            <n0:CSVTables>
               <n0:CSVTable>
                  <n0:Name>Table0</n0:Name>
                  <n0:Columns>ID,party_id,customer_number,Title,First,Last,Organization,Address,UpdatedTime</n0:Columns>
                  <n0:Rows>
                     <n0:Row>1,,,,Mike,Winter,2,,2013-07-29T15:54:56Z</n0:Row>
                     <n0:Row>1,,,,Mike,Winter,2,,2013-07-29T15:54:56Z</n0:Row>
                     <n0:Row>1,,,,Mike,Winter,2,mwinter@invalid.com,2013-07-29T15:54:56Z</n0:Row>
                     <n0:Row>2,101,,CIO,Justin,Case,1,,2013-07-26T19:39:49Z</n0:Row>
                     <n0:Row>2,101,,CIO,Justin,Case,1,,2013-07-26T19:39:49Z</n0:Row>
                     <n0:Row>2,101,,CIO,Justin,Case,1,jcase@invalid.invalid.com,2013-07-26T19:39:49Z</n0:Row>
                     <n0:Row>3,,,,George,Wood,16,,2013-07-29T14:34:46Z</n0:Row>
                     <n0:Row>3,,,,George,Wood,16,,2013-07-29T14:34:46Z</n0:Row>
                     <n0:Row>3,,,,George,Wood,16,gwood@wood.com,2013-07-29T14:34:46Z</n0:Row>
                     <n0:Row>4,,,,Angelina,Jolie,,,2013-07-01T19:48:09Z</n0:Row>
                     <n0:Row>4,,,,Angelina,Jolie,,,2013-07-01T19:48:09Z</n0:Row>
                     <n0:Row>4,,,,Angelina,Jolie,,angiebaby@yahoo.com,2013-07-01T19:48:09Z</n0:Row>
                     <n0:Row>5,101,,,Aaron,Tolbert,1,,2013-07-27T04:58:41Z</n0:Row>
                     <n0:Row>5,101,,,Aaron,Tolbert,1,,2013-07-27T04:58:41Z</n0:Row>
                     <n0:Row>5,101,,,Aaron,Tolbert,1,atolbert@serenecorp.com,2013-07-27T04:58:41Z</n0:Row>
                  </n0:Rows>
               </n0:CSVTable>
            </n0:CSVTables>
         </n0:CSVTableSet>
      </n0:QueryCSVResponse>
   </soapenv:Body>
</soapenv:Envelope>

 

Is it based on fields I am quering? B'se If I query only Id and Name, it returns me only one row per Id.

Thanks,

--Tushar

 


Viewing all articles
Browse latest Browse all 2504

Trending Articles