如何在TCC输出中添加行号列



如何在 Taleo Connect 客户端提取脚本中添加行号列?我正在使用下面的XML,但我遇到了问题。

<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>

我提到的这个链接:https://docs.oracle.com/cloud/18a/taleo/OTCCU/_advancedqueries.htm#OTCCUid095TG0F90HT

若要向导出添加行号,可以使用以下复杂投影:

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

解释

  1. 在 Taleo Connect 客户端中打开导出。
  2. 打开"常规"选项卡,并将"导出模式"设置为"CSV 报告"。
  3. 打开投影选项卡。
  4. 单击添加
  5. 选择添加复杂投影,然后单击确定
  6. 复杂投影下,输入以下内容:

    <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. 保存更改。

<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>

结果:

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

笔记

  • 如果在高级选项中启用了"防止重复",则删除的行将递增行索引,即使它们未在结果文件中显示也是如此。

最新更新