Flex+SharePoint List XML

I read up on several blogs about how to get List data from SharePoint into Flex.  A very easy way seems to be described on this blog using the owssvr.dll commands to output XML.
My issue is that I cannot figure out how to parse through the XML that is returned to populate an XMLList or ArrayCollection or just into a DataGrid.
Here is a sample of what is returned...I have put in BOLD what I am trying to List out - the actual list items:
<?xml version="1.0" encoding="utf-8"?>
<xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
xmlns:rs='urn:schemas-microsoft-com:rowset'
xmlns:z='#RowsetSchema'>
<s:Schema id='RowsetSchema'>
<s:ElementType name='row'
content='eltOnly'
rs:CommandTimeout='30'>
<s:AttributeType name='ows_LinkTitle'
rs:name='Title'
rs:number='2'>
<s:datatype dt:type='string'
dt:maxLength='512' />
</s:AttributeType>
<s:AttributeType name='ows_AnnotationID'
rs:name='Annotation ID'
rs:number='3'>
<s:datatype dt:type='string'
dt:maxLength='512' />
</s:AttributeType>
<s:AttributeType name='ows_MediaPath'
rs:name='Media Path'
rs:number='4'>
<s:datatype dt:type='string'
dt:maxLength='512' />
</s:AttributeType>
<s:AttributeType name='ows_TimeCode'
rs:name='Time Code'
rs:number='5'>
<s:datatype dt:type='string'
dt:maxLength='512' />
</s:AttributeType>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row ows_LinkTitle='my first test item'
ows_AnnotationID='b3cd9a8c-e7d1-439e-b910-a94e1d91f406'
ows_MediaPath='http://localhost, http://localhost/media1.wmv'
ows_TimeCode='00:00:03.1234567' />
<z:row ows_LinkTitle='my second test item'
ows_AnnotationID='b3cd9a8c-e7d1-439e-b910-a94e1d91f406'
ows_MediaPath='http://localhost, http://localhost/media2.wmv'
ows_TimeCode='00:00:03.1234567' />
</rs:data>
</xml>
Any help on an HTTPService request that returns the XML and then collects it into the right variable to bind it around my application would be very helpful.  I just need to know how to drill down to those nodes to get at the data I want.
Thank you.

Hey Jeff--
I'm having a similar issue..or at least have a similar question!
Someone is looking into the question I raised, so you may want to follow the thread if anything happens on it that would be of use to you.
http://forums.adobe.com/thread/488790
Thanks

Similar Messages

  • Build XML for Custom Nested Accordian (like Tree View Structure) for SharePoint List Data

    Expected output in Xml:
    <?xml version="1.0" encoding="utf-8" ?>
    - <TopRoot>
    - <Root id="1" Name="Department">
    - <Type id="2" Name="IT">
    - <SubType id="3" Name="Technology">
      <SubSubType id="4" Name="Sharepoint" />
      <SubSubType id="5" Name="ASP.NET" />
      <SubSubType id="6" Name="HTML 5" />
      </SubType>
      </Type>
    </Root>
    </TopRoot>
    List Details:
    list details for storing category / sub category data and code to build tree structure for the same.
    1.Create Custom List named “CategoryDetails”:
    2.Create Column “Category Name” of type single line of text. Make it as required field and check Yes for Enforce Unique values.
    3.Create column “Parent Category” of type lookup. under Additional Column Settings.
    Get information dropdown, select “CategoryDetails”.
    4.Choice column ["SRTypeName"] 1.Root,2.SRTYPE,3.SubSRTYPE, 4.SUBSUBSRTYPE
    In this column dropdown, select “Category Name”:  
    Referance:
    http://www.codeproject.com/Tips/627580/Build-Tree-View-Structure-for-SharePoint-List-Data    -fine but don't want tree view just generate xml string
    i just follwed above link it work perferfectly fine for building tree view but i don't want server control.
    Expected Result:
    My ultimate goal is to generate xml string like above format without building tree view.
    I want to generate xml using web service and using xml i could convert into nested Tree View Accordian in html.
    I developed some code but its not working to generate xml /string.
    My modified Code:
    public const string DYNAMIC_CAML_QUERY =
            "<Where><IsNull><FieldRef Name='{0}' /></IsNull></Where>";
            public const string DYNAMIC_CAML_QUERY_GET_CHILD_NODE =
            "<Where><Eq><FieldRef Name='{0}' /><Value Type='LookupMulti'>{1}</Value></Eq></Where>";
            protected void Page_Load(object sender, EventArgs e)
                if (!Page.IsPostBack)
                 string TreeViewStr= BuildTree();
                 Literal1.Text = TreeViewStr;
            StringBuilder sbRoot= new StringBuilder();
            protected string BuildTree()
                SPList TasksList;
                SPQuery objSPQuery;
                StringBuilder Query = new StringBuilder();
                SPListItemCollection objItems;
                string DisplayColumn = string.Empty;
                string Title = string.Empty;
                string[] valueArray = null;
                try
                    using (SPSite site = new SPSite(SPContext.Current.Web.Url))
                        using (SPWeb web = site.OpenWeb())
                            TasksList = SPContext.Current.Web.Lists["Service"];
                            if (TasksList != null)
                                objSPQuery = new SPQuery();
                                Query.Append(String.Format(DYNAMIC_CAML_QUERY, "Parent_x0020_Service_x0020_Id"));
                                objSPQuery.Query = Query.ToString();
                                objItems = TasksList.GetItems(objSPQuery);
                                if (objItems != null && objItems.Count > 0)
                                    foreach (SPListItem objItem in objItems)
                                        DisplayColumn = Convert.ToString(objItem["Title"]);
                                        Title = Convert.ToString(objItem["Title"]);
                                        int rootId=objItem["ID"].ToString();
                                        sbRoot.Append("<Root id="+rootId+"
    Name="+Title+">");
                                        string SRAndSUBSRTpe = CreateTree(Title, valueArray,
    null, DisplayColumn, objItem["ID"].ToString());
                                        sbRoot.Append(SRAndSUBSRTpe);
                                        SRType.Clear();//make SRType Empty
                                        strhtml.Clear();
                                    SRType.Append("</Root>");
                catch (Exception ex)
                    throw ex;
                return SRType.ToString();
             StringBuilder strhtml = new StringBuilder();
            private string CreateTree(string RootNode, string[] valueArray,
          List<SPListItem> objNodeCollection, string DisplayValue, string KeyValue)
                try
                    strhtml.Appends(GetSRType(KeyValue, valueArray, objNodeCollection);
                catch (Exception ex)
                    throw ex;
                return strhtml;
            StringBuilder SRType = new StringBuilder();
            private string GetSRType(string RootNode,
            string[] valueArray, List<SPListItem> objListItemColn)
                SPQuery objSPQuery;
                SPListItemCollection objItems = null;
                List<SPListItem> objNodeListItems = new List<SPListItem>();
                objSPQuery = new SPQuery();
                string objNodeTitle = string.Empty;
                string objLookupColumn = string.Empty;
                StringBuilder Query = new StringBuilder();
                SPList objTaskList;
                SPField spField;
                string objKeyColumn;
                string SrTypeCategory;
                try
                    objTaskList = SPContext.Current.Web.Lists["Service"];
                    objLookupColumn = "Parent_x0020_Service_x0020_Id";//objTreeViewControlField.ParentLookup;
                    Query.Append(String.Format
                    (DYNAMIC_CAML_QUERY_GET_CHILD_NODE, objLookupColumn, RootNode));
                    objSPQuery.Query = Query.ToString();
                    objItems = objTaskList.GetItems(objSPQuery);
                    foreach (SPListItem objItem in objItems)
                        objNodeListItems.Add(objItem);
                    if (objNodeListItems != null && objNodeListItems.Count > 0)
                        foreach (SPListItem objItem in objNodeListItems)
                            RootNode = Convert.ToString(objItem["Title"]);
                            objKeyColumn = Convert.ToString(objItem["ID"]);
                            objNodeTitle = Convert.ToString(objItem["Title"]);
                            SrTypeCategory= Convert.ToString(objItem["SRTypeName"]);
                           if(SrTypeCategory =="SRtYpe")
                              SRType.Append("<Type  id="+objKeyColumn+" Name="+RootNode+ ">");
                             if (!String.IsNullOrEmpty(objNodeTitle))
                              SRType.Append(GetSRType(objKeyColumn, valueArray, objListItemColn));
                          if(SrTypeCategory =="SRSubTYpe")
                              SRType.Append("<SRSubType  id="+objKeyColumn+" Name="+RootNode+
    ">");  
                             if (!String.IsNullOrEmpty(objNodeTitle))
                              SRType.Append(GetSRType(objKeyColumn, valueArray, objListItemColn));
                          if(SrTypeCategory =="SubSubTYpe")
                              SRType.Append("<SubSubType  id="+objKeyColumn+" Name="+RootNode +"
    ></SubSubType");  
                        SRType.Append("</SubType>");
                        SRType.Append("</Type>");
                catch (Exception ex)
                    throw ex;
                return SRType.ToString();
                // Call method again (recursion) to get the child items

    Hi,
    According to your post, my understanding is that you want to custom action for context menu in "Site Content and Structure" in SharePoint 2010.
    In "SiteManager.aspx", SharePoint use MenuItemTemplate class which represent a control that creates an item in a drop-down menu.
    For example, to create or delete the ECB menu for a list item in
    "Site Content and Structure", we can follow the steps below:
    To add the “My Like” menu, we can add the code below:      
    <SharePoint:MenuItemTemplate
    UseShortId=false
    id="OLListItemLike"
    runat="server"
    Text="My Like"
    ImageUrl="/_layouts/images/DelItem.gif"
    ClientOnClickNavigateUrl="https://www.google.com.hk/"
    />
    To remove the “Delete” menu, we can comment the code below:
    <SharePoint:MenuItemTemplate
    UseShortId=false
    id="OLListItemDelete"
    runat="server"
    Text="<%$Resources:cms,SmtDelete%>"
    ImageUrl="/_layouts/images/DelItem.gif"
    ClientOnClickScript="%SmtObjectDeleteScript%"
    />            
    The result is as below:
    More information:
    MenuItemTemplate Class (Microsoft.SharePoint.WebControls)
    MenuItemTemplate.ClientOnClickScript property (Microsoft.SharePoint.WebControls)
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • [svn] 2942: Add webapps/webtier/WEB-INF/flex/flex-sdk-description. xml to the ignore list.

    Revision: 2942
    Author: [email protected]
    Date: 2008-08-21 07:52:24 -0700 (Thu, 21 Aug 2008)
    Log Message:
    Add webapps/webtier/WEB-INF/flex/flex-sdk-description.xml to the ignore list.
    Property Changed:
    flex/sdk/trunk/webapps/webtier/WEB-INF/flex/

    java.lang.ClassNotFoundException: flex.messaging.HttpFlexSession
    This class exists in flex-messaging-core.jar
    Looks like BlazeDS libraries are not loaded. Check if BlazeDS libraries exists in your WEB-INF/lib directory.
    webapps\{yourwebapp}\WEB-INF\lib
    Hope it helps you.

  • How do I change multiple list items at once in a SharePoint list with ribbon button

    Hi
    I have a sharepoint list and a ribbon button that open a dialog box with buttons to set color on a row
    The problem is that i can only selecet one item at once to set the color. 
    How can i do so it could set all or a couple items att once to the color i want 
    I want to do this with javascript
    here is the code i use to get the item id and the color code is in a seperate js file
    'use strict';
    var clientContext, hostweburl, parentContext, parentWeb, selectedItem, itemId, listId;
    clientContext = new SP.ClientContext.get_current();
    hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
    listId = decodeURIComponent(getQueryStringParameter("SPListId"));
    itemId = decodeURIComponent(getQueryStringParameter("SPListItemId"));
    parentContext = new SP.AppContextSite(clientContext, hostweburl);
    parentWeb = parentContext.get_web();
    selectedItem = parentWeb.get_lists().getById(listId).getItemById(itemId);
    $(document).ready(function () {
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(OnSuccess, OnFail);
    function OnSuccess() {
    $("#Blue").click(function () {
    selectedItem.set_item('Color', 'Blue');
    selectedItem.update();
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });
    $("#Green").click(function () {
    selectedItem.set_item('Color', 'Green');
    selectedItem.update();
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });
    $("#Red").click(function () {
    selectedItem.set_item('Color', 'Red');
    selectedItem.update();
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });
    $("#Transparent").click(function () {
    selectedItem.set_item('Color', 'No Color');
    selectedItem.update();
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });

    Check if below can help you
    http://sp2010batchedit.codeplex.com/
    http://sharepoint.stackexchange.com/questions/35935/use-view-ribbon-custom-action-on-multiple-list-items
    http://webcache.googleusercontent.com/search?q=cache:XqMO-PRLHQIJ:dannyjessee.com/blog/index.php/2014/06/enabling-custom-ribbon-buttons-dynamically-based-on-multiple-selected-item-values-using-refreshcommandui-and-jsom/+&cd=1&hl=en&ct=clnk&gl=in
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction Id="DannyJessee.TestCustomAction"
    Location="CommandUI.Ribbon"
    RegistrationId="100"
    RegistrationType="List">
    <CommandUIExtension>
    <CommandUIDefinitions>
    <CommandUIDefinition
    Location="Ribbon.ListItem.Actions.Controls._children">
    <Button Id="DannyJessee.MarkItemsFinishedButton"
    Command="cmdMarkItemsFinished"
    Image16by16="/_layouts/images/kpinormallarge-0.gif"
    Image32by32="/_layouts/images/kpinormallarge-0.gif"
    LabelText="Mark as Finished"
    TemplateAlias="o2" />
    </CommandUIDefinition>
    </CommandUIDefinitions>
    <CommandUIHandlers>
    <CommandUIHandler Command="cmdMarkItemsFinished"
    CommandAction="javascript:MarkItemsFinished();"
    EnabledScript="javascript:EnableFinishedButton();">
    </CommandUIHandler>
    </CommandUIHandlers>
    </CommandUIExtension>
    </CustomAction>
    <CustomAction Id="DannyJessee.TestScript"
    Location="ScriptLink"
    ScriptSrc="/_layouts/15/CustomRibbonButton/CustomAction.js" />
    </Elements>
    If this helped you resolve your issue, please mark it Answered

  • Upload Excel data to Sharepoint list VIA infopath form

    Hi,
    I'll try to explain the process of what I want to do first.
    1. In Excel
    I have an exceldocument (XLS, XLSX or XLSM) with 4 named columns and a named worksheet saved locally on my computer.
    I want to upload this data into preferably a custom list in sharepoint but it needs to run via a infopath template first.
    2. In Infopath
    The Infopath template will prompt the user to specify values in 2 additional fields.
    After giving input to these fields user may browse for the locally stored excel document and upload the document.
    In the same infopath template a dynamic array should be visible containing 6 columns (4 from excel + 2 from headerlevel of template) and the amount of rows based on the number of rows from excelsheet.
    At the end of template a submit button is found for uploading the entire array into sharepoint custom list.
    Is this possible to do at all?
    NOTE! End user should not have to save the excelsheet as XML file nor do a XML mapping.
    Infopath should, perhaps with help of VBA read excelsheet and transfer data to correct destination in sharepoint on it self.
    Looking forward to your reply

    Hi Jonas,
    You can attach your Excel doucment into InfoPath form and send InfoPath form to a custom web service. Then you can parse the Excel data and combine the Excel data and additional fields into SharePoint list in the customized  web service.
    For more information, you can have a look at the thread:
    http://dandeng.blogspot.com/2012/03/submit-infopath-form-data-to-web.html
    http://www.codeproject.com/Articles/88547/Submit-entire-InfoPath-form-to-web-service
    https://social.msdn.microsoft.com/Forums/office/en-US/590f1e78-5c08-47bd-8af4-9709102b568d/webservice-to-send-attachments-in-infopath-form-to-different-location?forum=sharepointcustomization
    https://msdn.microsoft.com/en-us/library/office/gg575571.aspx?f=255&MSPPError=-2147217396
    Best Regards,
    Eric
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to submit InfoPath form data to multiple SharePoint lists at one time?

    Hi,
    I'm looking for a way to submit certain data in InfoPath form to separate SharePoint lists at the same time. I have a form that has two views with many data in them. I want to keep these data in separate SharePoint list besides keeping them in the XML. I know that you can submit to a form library using SharePoint document library data connection, but I'm not sure if you can use several data connections for submitting data to multiple SharePoint lists. Is it only possible to do using code? If yes, can anyone show a sample. I have never coded in InfoPath, though I used C# a lot in .Net.
    Thank you!Regards,
    R.D.M.

    This is an old thread but I tripped over a codeless method to do this with OOB InfoPath 2010 and SP 2010. 
    Assuming your main InfoPath form is published to a document library with the promoted fields that you want to see.
      Publish your form to a new document library to capture the secondary data fields that you want separated out.
    Using the Publishing Wizard do the following:
    Go to – File then Publish
    Select SharePoint Server “ Publish form to a SharePoint Library”
    Enter location of your SharePoint or InfoPath Forms Services Site: 
    accept the default in this field from the first published event
    Next screen, keep the default or change it, Form Library, Site Content Type or Admin Approved
    Next screen, What do you want to do?
    Create a new form library
    Add new document library name and description
    Next screen, Remove all promoted fields not applicable to the new library and add all of the ones you want to see data for.
    Click Next and Publish
    Come back into the form: If you don’t have buttons added directly to the form to submit or update, add them.
    Create a new Action rule on the button
    Label the rule to keep it straight
    Condition, occurs when button clicked
    Add action, Submit data
    Use data connection to the second library created
    Create a second new Action rule on the same button
    Label the rule to keep it straight
    Condition, occurs when button clicked
    Add action, Submit data
    Use original data connection to the library
    Then you can add another action to close the form or do whatever you need.
    Republish the form to both libraries to set the template for both.
    File – Publish – SharePoint Server
    Select Secondary library from drop down follow the rest of the prompts
    Follow step 5a again, select Primary library from drop down, Add back in all of the promoted fields needed for the primary library and follow the prompts.
    DOCUMENT YOUR FORM WELL FOR MAINTENANCE
    Special considerations, your primary library needs a unique ID to reference in your secondary library.
    Your secondary library will need a unique ID that is not related to the primary if you are going to store multiple records for a single primary library reference. 
    Example: One form, multiple updates.

  • How to select column dynamically with sharepoint list as data source in ssrs report

    Hi all,
    I am creating reports from SharePoint list but i have requirements to select the column name dynamically with SharePoint list as data source. I didn't find any way of doing this.. 
    Can anyone help me to resolve this issue..
    There is no way of specifying column name dynamically here in data set query
    <RSSharePointList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <ListName>test list</ListName>
      <ViewFields>
        <FieldRef Name="ID" />
        <FieldRef Name="ContentType" />
        <FieldRef Name="Title" />
        <FieldRef Name="Modified" />
        <FieldRef Name="Created" />
        <FieldRef Name="Author" />
        <FieldRef Name="Editor" />
        <FieldRef Name="_UIVersionString" />
        <FieldRef Name="Attachments" />
        <FieldRef Name="Edit" />
        <FieldRef Name="LinkTitleNoMenu" />
        <FieldRef Name="LinkTitle" />
        <FieldRef Name="DocIcon" />
        <FieldRef Name="ItemChildCount" />
        <FieldRef Name="FolderChildCount" />
        <FieldRef Name="test_x0020_date" />
        <FieldRef Name="title2" />
      </ViewFields>
    </RSSharePointList>

    Hi MNRSPDev,
    Sorry for the delay.
    According to the current description, I understand that you want to specify column name in dataset query designer dynamically when using SharePoint list data source.
    Based on my research, this is not supported by default. As a workaround, you can use XML data source. The XML content can be embedded directly within the query. This lets you use the expression capabilities within the processing engine to build queries and
    data dynamically within the report. And it can be used for retrieving XML data directly from an external data source, passing it using parameters, and embedding it within the query.
    Reference:
    http://www.codeproject.com/Articles/56817/Dynamic-Reports-with-Reporting-Services
    Hope this helps.
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • Syntax Error with JSON.Parse method to parse SharePoint List Items

    Hi All,
    I want to get SharePoint List data and bind that retrived data to the JQuery Grid Control.
    For this I used SPServices to get the SharePoint List data in SOAP Envelope. Now I need to parse the soap envelope and store the retrieved items in array to pass it to the Grid Control.
    While using the JSON.Parse(resporseText) method, Iam consistenly getting an Syntax Error!
    Could anyone help me with this ?
    Please find the SOAP Envelope I received from SP List as below:
    "<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetListItemsResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/"><GetListItemsResult><listitems xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
    xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
    xmlns:rs='urn:schemas-microsoft-com:rowset'
    xmlns:z='#RowsetSchema'>
    <rs:data ItemCount="2">
    <z:row ows_OBNumber='112211.000000000' ows_Project_x0020_Name='Project 1' ows_MetaInfo='11;#' ows__ModerationStatus='0' ows__Level='1' ows_Title='Project 1' ows_ID='11' ows_UniqueId='11;#{FBBCBCF9-666D-42F9-92D7-67188C51BC9B}' ows_owshiddenversion='1' ows_FSObjType='11;#0' ows_Created='2015-01-12 10:25:06' ows_PermMask='0x7fffffffffffffff' ows_Modified='2015-01-12 10:25:06' ows_FileRef='11;#sites/Lists/Projects/11_.000' />
    <z:row ows_OBNumber='1122343.00000000' ows_Project_x0020_Name='Project 2 ' ows_MetaInfo='12;#' ows__ModerationStatus='0' ows__Level='1' ows_Title='Project 2' ows_ID='12' ows_UniqueId='12;#{0D772B76-68E4-4769-B6FF-6A269F9C7ABD}' ows_owshiddenversion='1' ows_FSObjType='12;#0' ows_Created='2015-01-12 10:33:48' ows_PermMask='0x7fffffffffffffff' ows_Modified='2015-01-12 10:33:48' ows_FileRef='12;#sites/Lists/Projects/12_.000' />
    </rs:data>
    </listitems></GetListItemsResult></GetListItemsResponse></soap:Body></soap:Envelope>"
    Any help on this will be greatly appreciated.
    Thanks In Advance.!

    Hi,
    According to your description, there is an issue when parsing result from the data retrieved using SPServices.
    By default, SPServices returns data as XML format, however, the JSON.parse() method “Throws a SyntaxError exception if the string to parse is not valid JSON”:
    https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse
    To extract the data needed from the response, you can either take the demo below for as a reference:
    http://spservices.codeplex.com/wikipage?title=GetListItems
    Or use the jQuery.parseXML() function:
    http://api.jquery.com/jquery.parsexml/
    Best regards
    Patrick Liang
    TechNet Community Support

  • Set "peoples or groups" field with current user "login name" in sharepoint list form using javascript

    hi friends
    i am trying to set peoples or groups field in sharepoint  list form with current user login name
    here my code
    <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.js"></script>
    <script type="text/javascript">
    $(document).ready(function NewItemView () {
    var currentUser;
        if (SP.ClientContext != null) {
          SP.SOD.executeOrDelayUntilScriptLoaded(getCurrentUser, 'SP.js');
        else {
          SP.SOD.executeFunc('sp.js', null, getCurrentUser);
        function getCurrentUser() {
          var context = new SP.ClientContext.get_current();
          var web = context.get_web();
          currentUser = web.get_currentUser();
          context.load(currentUser);
          context.executeQueryAsync(onSuccessMethod, onRequestFail);
        function onSuccessMethod(sender, args) {
          var account = currentUser.get_loginName();
          var accountEmail = currentUser.get_email();
          var currentUserAccount = account.substring(account.indexOf("|") + 1);
        SetAndResolvePeoplePicker("requester",account);
    // This function runs if the executeQueryAsync call fails.
        function onRequestFail(sender, args) {
          alert('request failed' + args.get_message() + '\n' + args.get_stackTrace());
     function SetAndResolvePeoplePicker(fieldName, userAccountName) {
       var controlName = fieldName;
        var peoplePickerDiv = $("[id$='ClientPeoplePicker'][title='" + controlName + "']");
        var peoplePickerEditor = peoplePickerDiv.find("[title='" + controlName + "']");
        var spPeoplePicker = SPClientPeoplePicker.SPClientPeoplePickerDict[peoplePickerDiv[0].id];
        peoplePickerEditor.val(userAccountName);
        spPeoplePicker.AddUnresolvedUserFromEditor(true);
    </script>
    but it is not working
    please help me

    Hi,
    According to your post, my understanding is that you wanted to set "peoples or groups" field with current user "login name" in SharePoint list form using JavaScript.
    To set "peoples or groups" field with current user "login name”,  you can use the below code:
    <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.js"></script>
    <script type="text/javascript">
    function SetPickerValue(pickerid, key, dispval) {
    var xml = '<Entities Append="False" Error="" Separator=";" MaxHeight="3">';
    xml = xml + PreparePickerEntityXml(key, dispval);
    xml = xml + '</Entities>';
    EntityEditorCallback(xml, pickerid, true);
    function PreparePickerEntityXml(key, dispval) {
    return '<Entity Key="' + key + '" DisplayText="' + dispval + '" IsResolved="True" Description="' + key + '"><MultipleMatches /></Entity>';
    function GetCurrentUserAndInsertIntoUserField() {
    var context = new SP.ClientContext.get_current();
    var web = context.get_web();
    this._currentUser = web.get_currentUser();
    context.load(this._currentUser);
    context.executeQueryAsync(Function.createDelegate(this, this.onSuccess),
    Function.createDelegate(this, this.onFailure));
    function onSuccess(sender, args) {
    SetPickerValue('ctl00_m_g_99f3303a_dffa_4436_8bfa_3511d9ffddc0_ctl00_ctl05_ctl01_ctl00_ctl00_ctl04_ctl00_ctl00_UserField', this._currentUser.get_loginName(),
    this._currentUser.get_title());
    function onFaiure(sender, args) {
    alert(args.get_message() + ' ' + args.get_stackTrace());
    ExecuteOrDelayUntilScriptLoaded(GetCurrentUserAndInsertIntoUserField, "sp.js");
    </script>
    More information:
    http://alexeybbb.blogspot.com/2012/10/sharepoint-set-peoplepicker-via-js.html
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • "Root element is missing." - While using Sharepoint List Source in SSIS.

    Hi Team,
    We are trying to import data from sharepoint list using sharepointlist source in SSIS. But the following error pops-up.
    [SP_SRC_SharePointList [67]] Error: System.Xml.XmlException: Root element is missing.
       at System.Xml.XmlTextReaderImpl.Throw(Exception e)
       at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
       at System.Xml.XmlTextReaderImpl.Read()
       at System.Xml.XmlReader.MoveToContent()
       at System.Xml.Linq.XElement.Load(XmlReader reader, LoadOptions options)
       at System.Xml.Linq.XElement.Parse(String text, LoadOptions options)
       at System.Xml.Linq.XElement.Parse(String text)
       at Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.SharePointListSource.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)
       at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper100 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer100[] buffers, IntPtr ppBufferWirePacket)
    We are unable to debug / move any further. Request your help.
    Thank you.
    Best Regards,
    Gayathri

    It appears that the XML you trying to load does indeed not have the root element.
    E.g.
    <?xml version="1.0" encoding="UTF-8"?>
    <iii>
    <kkk>test</kkk>
    <ppp>000</ppp>
    </iii>
    <iii>
    <kkk>test</kkk>
    <ppp>000</ppp>
    </iii>
    <iii>
    <kkk>test</kkk>
    <ppp>000</ppp>
    </iii>has nonemust be<?xml version="1.0" encoding="UTF-8"?>
    <Root><iii>
    <kkk>test</kkk>
    <ppp>000</ppp>
    </iii>
    <iii>
    <kkk>test</kkk>
    <ppp>000</ppp>
    </iii>
    <iii>
    <kkk>test</kkk>
    <ppp>000</ppp>
    </iii></Root>
    Arthur My Blog

  • How to use Crystal Reports to report on Microsoft Sharepoint Lists?

    I am attempting to report on the items in Microsoft Sharepoint lists.  I have created a new data connection (web service) and selected the following options:
    Use Web Service Data Source
    Use HTTP(S) WSDL
    HTTP(S) WSDL URL:  http://sitename.com/sites/mysitename/_vti_bin/lists.asmx?WSDL
    Use WS-Security Config File:  NO
    HTTP(S) WSDL User ID:  <blank>
    HTTP(S) WSDL Password:  <blank>
    Service:  Lists
    Port:  ListsSoap
    Method:  GetList
    Alas, Crystal seems quite rude and tells me:
    Cannot determine the queries necessary to get data for this report.
    Details:  Cannot access web service
    Transport error:  401 Error:  Unauthorized
    Has anyone out there successfully done this?  Anyone have any ideas?

    Hello,
    See if this post helps: CR2008: Connecting to XML and Web Services data through a proxy
    Don

  • Build Report using sharePoint list datasource for EPM projects.

    Hi all,
    I am using Project Server 2010. 
    When project is created using EPT then for that project a site will be created and each site has sharePoint Lists. 
    I want to build SSRS report that uses this sharepoint list as datasource. 
    My connection string to the site URL must be dynamic as each project site URL will be different. 
    Your help will be appreciated!!!
    Thanks,
    Rohit

    Hello,
    Look to use an expression and pass in the Project Site URL, see the example below:
    SharePoint Web Services (XML) version but gives you the idea for using an expression:
    http://nearbaseline.com.au/blog/2010/02/reporting-workspace-lists-directly-from-sharepoint/
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS |
    MVP | Downloads

  • Filtering sharepoint list data using report parameters

    We are using xml to pull data from a custom sharepoint list into sql 2005. We have set a parameter that allows the user to filter the data by surname, however when the user tries to filter the list the drop down box brings up a list of every record, so there are duplicate entries for each surname.
    Is there a way of filtering this so that there is only one instance of the users surname instead of it showing all the records?
    Any help would be much appreciated.  

    Hi,
    Please see the below url
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/c43f25ab-aa3c-4586-85a1-1b89c3b21b12/how-to-filter-a-sharepoint-list-with-report-parameters?forum=sqlreportingservices
    Solution is define here.
    Hasan Jamal Siddiqui(MCTS,MCPD,ITIL@V3),Sharepoint and EPM Consultant,TCS
    |
    | Twitter

  • Import sharepoint list with di

    Has anyone successfully imported a SharePoint List using Data Integrator (DI)? We are having an issue with the mixed content WSDL generated by SharePoint.

    Hi Keith,
    I've seen that kinda issue with trying to use the Sharepoint lists.asmx WSDL in Data Integrator before.  Because that WSDL file has mixed content for almost all of its functions, DI doesn't know how to properly format the metadata.  Without a specific metadata schema to follow, you can't design a dataflow to map between fields.  When a WSDL file provides actual schema definitions for its functions, DI can use the functions properly.  The same is true for mixed content in an XSD you want to import and use as an XML source -- how would DI know how to use the data if the format is unpredictable?
    Thanks,
    ~Scott

  • How to filter a sharepoint list with report parameters

    Hello there,
    I'm trying to make a sql report on a sharepoint library. I have no problems to connect to the library but i cannot find a way to filter my data source with report parameters. I've searched on the net a lot, found some stuffs about xml but nothing that shows
    how to do it with sharepoint. Any help would be greatly appreciated!
    Thanks in advance!

    Hi mgarant,
    As you mentioned, by default, we can use xml parameter "query" to filter a SharePoint list from SQL Server Reporting Services. We can also modify the value for the "query" to use SQL Server Reporting Serivces parameters to filter the SharePoint list.
    Below are the detailed steps for your reference:
     1.Change the query string to be a string like this:
    <Query>
    <SoapAction>http://schemas.microsoft.com/sharepoint/soap/GetListItems</SoapAction>
    <Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems">
    <Parameters>
    <Parameter Name="listName">
    <DefaultValue>{ADBE55DB-63A1-4C14-9DA0-B1B05C13B4C8}</DefaultValue>
    </Parameter>
    <Parameter Name="query" Type="xml">
    </Parameter>
    </Parameters>
    </Method>
    <ElementPath IgnoreNamespaces="true">*</ElementPath>
    </Query>
     2.In the dataset modification dialog, go to "Parameters" tab.
     3.Create a Report Parameter(e.g. CityParam).
     4.In parameter tab, create a parameter with:
    Name: query
    Value: ="<Query>
       <Where>
          <Eq>
             <FieldRef Name='WorkCity' />
             <Value Type='Text'>" & Parameters!CityParam.Value & "</Value>
          </Eq>
       </Where>
    </Query>"
    Please note, “case sensitive” is required. In this case, the parameter name for "query" must be in lower case. WorkCity is name of a field in the SharePoint list.
    For more information about how to retrieve value from SharePoint list, I would suggest you reading the following article and threads:
    http://vspug.com/dwise/2007/11/28/connecting-sql-reporting-services-to-a-sharepoint-list-redux/
    http://blogs.msdn.com/mariae/archive/2007/12/13/querying-sharepoint-list-from-reporting-services-returns-only-not-null-columns.aspx
    I also implemented a sample, you could download it from:
    http://cid-3c7e963ff6ccd974.office.live.com/browse.aspx/.Public/SharePoint%20List%20sample?uc=2
    Please feel free to ask, if you have any more questions.
    Thanks,
    Jin Chen
    Jin Chen - MSFT

Maybe you are looking for

  • BO4 Installation on AIX with DB2

    Hello, I hope this is the correct forum in which to pose such a question. We are currently planning an installation of BO4 on AIX and our standard choice of database platform is DB2 UDB V9.7. I have analysed the numerous SAP planning and installation

  • Session Killing - Automatically in 10g Forms

    Dear All, We have used when-timer expired-trigger in 6i forms and killed sessions which are idle for more than 30 mins. But the same form does not work with 10g forms. Is there any limitation in 10g forms with when-timer-expired trigger. How do we en

  • First time BB owner

    I am having trouble setting up my e-mail account use MSN Explorer with Outlook e-mail.I talked to the people at T-MOBIL and they are saying it can not be done.I have seen that some of you are doing it with no problems.Can someone tell me what to do?2

  • UWL slow and disconnects from backend

    Hi  guys, The UWL is sometimes slow, it takes awhile to load the workflow items but after a portal bounce it is fine for awhile, the portal itself is fast it is just UWL. It sometimes tells you there are no items to retrieve, even if there are and if

  • Is there any possibilities ??

    Hi all ,       I developed a form with TAB Canvas  . Now i had a thought of moving the tab pages as per our wish in the Runtime . That means , the user can manually arrange the tab pages which he frequently uses  (or) according to his wishes . Is the