[英]Taleo Connect Client Script
Summary: I'm trying to write a script that will pull through a candidates "answer" based off of of a "question code", and have it only pull one row of data per candidate.摘要:我正在尝试编写一个脚本,该脚本将根据“问题代码”提取候选人“答案”,并让每个候选人仅提取一行数据。
Problems:问题:
What I'm looking for: I'm trying to figure out possibly how to use a complex projection or a subquery (or something else, I'm not sure the right approach) within TCC that will only bring through the answer to that specific question, but also bring it through for people that have not answered it (leaving it blank though).我在找什么:我试图弄清楚如何在 TCC 中使用复杂的投影或子查询(或其他东西,我不确定正确的方法),这只会带来特定的答案问题,但也为没有回答的人提供它(尽管留空)。
Code explanation:代码说明:
Any help is extremely appreciated.非常感谢任何帮助。
<quer:query productCode="RC1704" model="http://www.taleo.com/ws/tee800/2009/01" projectedClass="Profile" 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="Candidate_ID">
<quer:field path="ProfileInformation,Candidate,Number"/>
</quer:projection>
<quer:projection alias="Visa_Needed">
<quer:field path="ProfileInformation,Candidate,QuestionAnswers,Answer,Description"/>
</quer:projection>
<quer:projection alias="Question">
<quer:field path="ProfileInformation,Candidate,QuestionAnswers,Question,Code"/>
</quer:projection>
</quer:projections>
<quer:projectionFilterings/>
<quer:filterings>
<quer:filtering>
<quer:equal>
<quer:field path="ProfileInformation,Candidate,Number"/>
<quer:long>36620</quer:long>
</quer:equal>
</quer:filtering>
</quer:filterings>
<quer:sortings/>
<quer:sortingFilterings/>
<quer:groupings/>
<quer:joinings/>
</quer:query>
Here is a way to do it using a complex projection.这是一种使用复杂投影的方法。 Note that I modified your query to start from the "Candidate" entity instead of "Profile" to shorten the field paths.请注意,我将您的查询修改为从“候选人”实体而不是“个人资料”开始,以缩短字段路径。
With the complex projection you can modify the filters of the main query to also extract candidates that did not answer to the question.使用复杂投影,您可以修改主查询的过滤器,以提取未回答问题的候选人。
<?xml version="1.0" encoding="UTF-8"?>
<quer:query productCode="RC1704" model="http://www.taleo.com/ws/tee800/2009/01" projectedClass="Candidate" locale="en" alias="MainQuery" mode="CSV" csvheader="true" largegraph="true" preventDuplicates="false" xmlns:quer="http://www.taleo.com/ws/integration/query">
<quer:subQueries/>
<quer:projections>
<quer:projection alias="Candidate_ID">
<quer:field path="Number"/>
</quer:projection>
<quer:projection alias="Visa_Needed">
<quer:query projectedClass="Candidate" alias="VisaAnswer">
<quer:projections>
<quer:projection alias="AnswerDesc">
<quer:field path="QuestionAnswers,Answer,Description"/>
</quer:projection>
</quer:projections>
<quer:filterings>
<quer:filtering>
<quer:equal>
<quer:field path="QuestionAnswers,Question,Code"/>
<quer:string>DQ_009</quer:string>
</quer:equal>
</quer:filtering>
<quer:filtering>
<quer:equal>
<quer:field path="Number"/>
<quer:field ownerQuery="MainQuery" path="Number"/>
</quer:equal>
</quer:filtering>
</quer:filterings>
</quer:query>
</quer:projection>
</quer:projections>
<quer:projectionFilterings/>
<quer:filterings>
<quer:filtering>
<quer:equal>
<quer:field path="Number"/>
<quer:long>36620</quer:long>
</quer:equal>
</quer:filtering>
</quer:filterings>
<quer:sortings/>
<quer:sortingFilterings/>
<quer:groupings/>
<quer:joinings/>
</quer:query>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.