简体   繁体   English

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

[英]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? 如何在Taleo Connect客户端提取脚本中添加行号列? I am using the below XML but I am facing issues. 我正在使用以下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>

This link I referred to: https://docs.oracle.com/cloud/18a/taleo/OTCCU/_advancedqueries.htm#OTCCUid095TG0F90HT 我引用的此链接为: https : //docs.oracle.com/cloud/18a/taleo/OTCCU/_advancedqueries.htm#OTCCUid095TG0F90HT

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. 在Taleo Connect客户端中打开导出。
  2. Open the General tab and set the Export mode to "CSV-report". 打开“ 常规”选项卡,并将“ 导出”模式设置为“ CSV报告”。
  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 笔记

  • If "Prevent duplicates" is enabled in advanced options, removed rows will increment the row index, even if they are not seen in the results file. 如果在高级选项中启用了“防止重复”,则即使在结果文件中看不到删除的行,行索引也会增加。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM