`
`function getFunding(){
` var Funding = [{}];
` var i = 0;
` //Web Service
`$().SPServices ({
` webURL: FundingWebURL,
` operation: 'GetListItems',
` listID: '{BB6490.......}',
` async: false,
` CAMLRowLimit:20,
` CAMLViewFields: "<ViewFields>" +
` "<FieldRef Name='ID' />" +
` "<FieldRef Name='FRID' />" +
` "<FieldRef Name='Title' />" +
` "<FieldRef Name='Date' /><Value IncludeTimeValue='FALSE' `Type='DateTime'></Value>" +
` "<FieldRef Name="Amount' />" +
` "</ViewFields>",
`CAMLQUERY:
` "<Query>" +
` "<Where>" +
` "<Contains>" +
` "<FieldRef Name='FRID' />" <Value `Type='text'>1</Value>" +
` "</Contains>" +
` "</Where>" +
` "<OrderBy>"+
` "<FieldRef Name='Title' Ascending='TRUE' />" +
` "</OrderBy>" +
` "</Query>",
`completeFunc: function(xData, Status) {
` //alert (xData.responseText);
` $(xData.responseXML).SPFilterNode("z:row").each(function() {
` Funding[i] = {
` "Info" : $(this).attr('ows_Title'),
` "ID" : $(this).attr('ows_FRID'),
` "FY" : $(this).attr('ows_Date'),
` "Amount" : $(this).attr('ows_Amount'),
`};
`i++;
`});
`}
`});// SP Services
`var FundingHTML="";
`
`for (var i=0; i < Funding.length; i++ ) {
` var value = "<table><tr><td width=100px>ID:" + Funding[i].ID +" `</td>
` <td width=300px>Title: " + Funding[i].Info +"</td>
` <td width=200px>FY: " + Funding[i].FY +"</td>
` <td width=200px>Amount: " + Funding[i].Amount +" `</td>
` </tr></table>";
` value = value.replace("string;#","");
` FundingHtml+= value + "<br/>";
`}
`FundingHtml+= "<br/><a href=https:/.........</a>"
`$("#Funding").html(FundingHtml);
`}
`
`
gives me the following output: 2022-05-30 00:00:00
I want this output: 05/30/2022
and
I want to return values of whatever the current ID is and not set a specific value?
Any help with modifying this script is appreciated. Thank you in advance.
How or where do I format this? Does anyone have a code sample?