Link to home
Start Free TrialLog in
Avatar of jhonc66
jhonc66Flag for Australia

asked on

display of a external content type using SPServices

Hello, i have got the following list which has been created already and it is called NotHereToday this list will be in charge of displaying the name and surname of the people not working Today in the office.  I also have the following code which sumarizes what I want to do but with a different list.. How can I make the following sample display the information I want. Two fields will be displayed preferred_name and surname

/* BIRTHDAYS AND LEAVE */

$().SPServices({
    operation: "GetListItems",
    async: false,
    listName: "TodaysLeaves",
    CAMLViewFields: "<ViewFields><FieldRef Name='full_name' /><FieldRef Name='leave_type' /></ViewFields>",
    completefunc: function (xData, Status) {
    

    
	  $(xData.responseXML).SPFilterNode("z:row").each(function() {

		if ($(this).attr("ows_leave_type") == "A") {
			leaveterm = "Annual Leave";
		} else if ($(this).attr("ows_leave_type") == "O") {
			leaveterm = "Other";
		}
		 else {
		    leaveterm = "Long Service";
		}

		 
var Listofonleave = "<span class='recordofperson'> "+ $(this).attr("ows_full_name") + "<span class='leavetype'>"+leaveterm +"</span></span>";
 
   	    $("#PeopleOnLeave").append(Listofonleave);
	 
      });

	  
    }
  });

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of jhonc66
jhonc66
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jhonc66

ASKER

I was able to come up with an answer