Search code examples
xmltaleotaleo-connect-client

How do I use a constant string as a Projection in Taleo Connect Client?


I have an Export created with Taleo Connect Client 17.4 that retrieves a list of offers from Taleo Enterprise 17.5.1.

OfferNumber    FirstName    LastName
101            Leesa        Rathe
102            Annabela     Purser
103            Mattie       Pietesch
104            Saw          Febvre

I want to modify my export to add an "ApplicantType" column that has a constant, pre-defined value of "Candidate".

OfferNumber    FirstName    LastName    ApplicantType
101            Leesa        Rathe       Candidate
102            Annabela     Purser      Candidate
103            Mattie       Pietesch    Candidate
104            Saw          Febvre      Candidate

I've tried using a complex projection <quer:string>Candidate</quer:string>, as well as concatenating two strings with a function projection, but each time the server returns a Workflow Execution Error.

How do I make my Export query return a column with a constant string value in Taleo Connect Client?

Export Query:

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

Solution

  • You should be able to use <quer:string>Candidate</quer:string> if you change the export mode to CSV.

    <quer:query productCode="RC1704" model="http://www.taleo.com/ws/tee800/2009/01" projectedClass="Offer" 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="OfferNumber">
                <quer:field path="Number"/>
            </quer:projection>
            <quer:projection alias="FirstName">
                <quer:field path="Application,Candidate,FirstName"/>
            </quer:projection>
            <quer:projection alias="LastName">
                <quer:field path="Application,Candidate,LastName"/>
            </quer:projection>
            <quer:projection alias="ApplicantType">
                <quer:string>Candidate</quer:string>
            </quer:projection>
        </quer:projections>
        <quer:projectionFilterings/>
        <quer:filterings/>
        <quer:sortings/>
        <quer:sortingFilterings/>
        <quer:groupings/>
        <quer:joinings/>
    </quer:query>
    

    Note that the export mode is "CSV", not CSV-entity. That might be what was causing your error.