locked
how to use count in fetch xml RRS feed

  • General discussion

  • Hi All;

    Below is my fetch xml code which runs fine until an unless i add count <attribute name="crmi_ebbarcodeid" alias="NoOfEvents" aggregate="countcolumn" /> ( which is shown in bold incode below)

    Any help much appreciated

    Thanks

    <fetch mapping="logical">
      <entity name="opportunity">
        <attribute name="new_mainprogramme_id" alias="MainProgramme" />
        <attribute name="opportunityid" />
        <attribute name="new_entrypoint" />
        <attribute name="new_dateofapplication" />
        <attribute name="statuscode" alias="OppStatus" />
        <attribute name="parentcontactid" />
        <attribute name="new_subprogramme_id" alias="SubProgramme" />
        <attribute name="ownerid" alias="BusinessAdvisor" />
        <attribute name="statuscode" alias="ApplicantStatus" />
        <link-entity name="contact" to="parentcontactid" from="contactid" alias="ct" link-type="outer">
          <attribute name="new_totalhours" alias="TotalHours" />
          <attribute name="new_totalhoursevent" alias="TotalHoursEvent" />
          <attribute name="new_totalhoursappointment" alias="TotalHoursAppointment" />
          <attribute name="new_noofappointments" alias="NoOfAppointments" />
          <attribute name="new_lastappointmentname" alias="LastAppointmentName" />
          <attribute name="new_lastappointmentdate" alias="LastAppointmentDate" />
          <attribute name="new_nextappointmentdate" alias="NextAppointmentDate" />
          <attribute name="new_jobcentreidname" alias="JobCentre" />
          <attribute name="new_localauthority" alias="LocalAuthority" />
    
    
    <link-entity name="crmi_ebattendee" to="contactid" from="crmi_ebcontactattendee" alias="er" link-type="outer">
    
    <link-entity name="crmi_ebbarcode" to="crmi_ebattendeeid" from="crmi_ebregistrant" alias="r" link-type="outer">
    
    
    <attribute name="crmi_ebbarcodeid" alias="NoOfEvents" aggregate="countcolumn" />
    
     <link-entity name="crmi_ebevent" to="crmi_ebevent" from="crmi_ebeventid" alias="c" link-type="outer">
    
    <attribute name="new_duration"  />
    
    
    </link-entity>
    </link-entity>
        </link-entity>
    
     </link-entity>
    <link-entity name="new_programmeoutput" to="opportunityid" from="new_relatedopportunity" alias="PO" link-type="outer">
           <attribute name="new_relatedcontact" />
           
           <attribute name="new_outputs" />
           
           <attribute name="statuscode" alias="OutputStatus" />
        
           <attribute name="statecode" />
          
          <attribute name="new_claimdate" alias="new_claimdate" />
      
          <attribute name="new_claimmonthid" />
    
    
    <link-entity name="new_outputlk" to="new_outputs" from="new_outputlkid" alias="ou" link-type="outer">
    
    
     <attribute name="new_printorder" />
    
    </link-entity>
    
    
    </link-entity>
    
    
     
    
    
    
      </entity>
    </fetch>


    Pradnya07

    • Changed type Simran08 Thursday, April 10, 2014 10:04 AM
    Wednesday, April 9, 2014 2:16 PM