xmlrow-numbertaleotaleo-connect-client

How do I add a row number column in TCC Output?


How do I add a row number column in a Taleo Connect Client extract script? I am using the below XML but I am facing issues.

<quer:projections alias="RCL_NP_all" xmlns:quer="http://www.taleo.com/ws/integration/query">
<quer:projection>
<quer:field path="no"/>
</quer:projection>
<quer:projection alias="rowIndex">
<quer:customValue>
<quer:expression>rowNum</quer:expression>
</quer:customValue>
</quer:projection>
</quer:projections>

This link I referred to: https://docs.oracle.com/cloud/18a/taleo/OTCCU/_advancedqueries.htm#OTCCUid095TG0F90HT


Solution

  • To add a row number to your export, you can use the following complex projection:

    <quer:projection alias="RowIndex" xmlns:quer="http://www.taleo.com/ws/integration/query">
         <quer:customValue>
             <quer:expression>rowNum</quer:expression>
         </quer:customValue>
    </quer:projection>
    

    Explanation

    1. Open your export in Taleo Connect Client.
    2. Open the General tab and set the Export mode to "CSV-report".
    3. Open the Projections tab.
    4. Click Add.
    5. Select Add a complex projection and click OK.
    6. Under Complex projection, enter the following:

      <quer:projection alias="RowIndex" xmlns:quer="http://www.taleo.com/ws/integration/query">
           <quer:customValue>
               <quer:expression>rowNum</quer:expression>
           </quer:customValue>
      </quer:projection>
      
    7. Save your changes.

    Example

    <quer:query productCode="RC1704" model="http://www.taleo.com/ws/tee800/2009/01" projectedClass="Candidate" locale="en" mode="CSV" csvheader="true" largegraph="true" preventDuplicates="false" xmlns:quer="http://www.taleo.com/ws/integration/query">
      <quer:subQueries/>
      <quer:projections>
        <quer:projection alias="RowIndex">
         <quer:customValue>
             <quer:expression>rowNum</quer:expression>
         </quer:customValue>
        </quer:projection>
        <quer:projection>
          <quer:field path="FirstName"/>
        </quer:projection>
        <quer:projection>
          <quer:field path="LastName"/>
        </quer:projection>
      </quer:projections>
      <quer:projectionFilterings/>
      <quer:filterings/>
      <quer:sortings/>
      <quer:sortingFilterings/>
      <quer:groupings/>
      <quer:joinings/>
    </quer:query>
    

    Results:

    RowIndex,FirstName,LastName
    1,John,Lee
    2,Adam,Jackson
    3,Jane,Doe
    

    Notes