Pulling user/group field data from SharePoint list using REST, jQuery, Knockout.js Sharepoint 2013

I'm trying to make an interactive task board based on the task list app in SharePoint 2013. The task lisk includes fields like "Title","Description","Status","% Complete","Due Date","Assigned To",
etc. I used knockout.js to bind "Title","Description", and "Status" to my HTML controls. Here is some of the code:
var ViewModal = function(items, listname){
var self = this;
self.sortBy = ko.observableArray(sortBy);
self.tasks = ko.observableArray(items);
self.listname = ko.observable(listname);
self.auto = ko.observable(false);
self.getTasks = function() {
clearTimeout(self.getTasks);
// server relative url to REST service endpoint
var ajaxurl = _spPageContextInfo.webServerRelativeUrl + "/_vti_bin/listdata.svc/" + self.listname() + "?$orderby=PriorityValue";
$.ajax({
type: "GET",
url: ajaxurl,
contentType: "application/json; charset=utf-8",
dataType: "json",
cache: false,
processData: true,
success: function (data, status, xhr) {
if (status == "success" && data) {
ko.mapping.fromJS(data.d.results, mapping, self.tasks)
$(".task-item").draggable();
error: alert
if (self.auto()) {
setTimeout(self.getTasks, 10000);
<div class="tasks-column">
<div class="column-header">Not Started</div>
<!-- ko foreach: tasksNotStarted -->
<div class="task-item">
<div class="view" data-bind="visible: !IsEditing()">
<button class="edit" data-bind="click: $root.editTask">edit</button>
<h2><span data-bind="text: Title"></span></h2>
<div data-bind="html: Description"></div>
<span data-bind="text: PriorityValue"></span>
</div>
<div class="edit" data-bind="visible: IsEditing">
<button class="save" data-bind="click: $root.saveTask">save</button>
<input type="text" data-bind="value: Title"></input>
</div>
</div>
I'm having trouble displaying the data from the "Assigned To" user/group field. I tried:
<span data-bind="text: AssignedTo"></span>
But it displays the field as [object Object]
I tried using $select/$expand
?$select=Title,AssignedTo/Id,Assignedto/Title&$expand=AssignedTo/Id,AssignedTo/T‌​itle";
But it still returns the [object Object]

Hi,
Please use the REST URI below:
/_api/lists/getbytitle('ListName')/items?$select=Title,AssignedTo/ID,AssignedTo/Title&$expand=AssignedTo/ID,AssignedTo/Title
More information for your reference:
How to get User Details and User Group Details in SharePoint 2013 REST API with Knockout for SharePoint Js (KoSpJs)
http://www.ashokraja.me/post/How-to-get-User-Details-and-User-Group-Details-in-SharePoint-2013-REST-API-with-Knockout-for-SharePoint-Js-(KoSpJs).aspx
How to Get Login Name and Display Name using SharePoint 2013 REST API
https://www.nothingbutsharepoint.com/sites/devwiki/articles/pages/how-to-get-login-name-and-display-name-using-sharepoint-2013-rest-api.aspx
Best Regards
Dennis Guo
TechNet Community Support

Similar Messages

  • Unable to save lookup field data in SharePoint 2013 online list

    Dear Support,
    I had successfully created provider hosted app and deployed on SharePoint 2013 online site, in my project I created orderservice.asmx.cs web service and write a code for save record on SharePoint
    2013 online list as I mentioned below and calling on App1.js file.
    But I am unable to save lookup field value as mentioned below code
    Customer is a lookup field I want to save data in SharePoint 2013 online list( Order)where I had successfully
    inserted text field  data (Title &
    Special_x0020_Instruction).
    i am getting error as mentioned below
    500 Internal Server Error {"Message":"Invalid web service call, missing value for parameter: \u0027Title1\u0027.","StackTrace":"   at System.Web.Script.Services.WebServiceMethodData.CallMethod(Object target, IDictionary`2
    parameters)\r\n   at System.Web.Script.Services.WebServiceMethodData.CallMethodFromRawParams(Object target, IDictionary`2 parameters)\r\n   at System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context, WebServiceMethodData methodData,
    IDictionary`2 rawParams)\r\n   at System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)","ExceptionType":"System.InvalidOperationException"}
    Please let me know the code how to insert lookup field value (Customer)
    in SharePoint online list.
    OrderService.asmx.cs
    Public
    int InsertOrder (Order
    orderRecord)
                pwd.MakeReadOnly();
                clientContext.Credentials =
    new
    SharePointOnlineCredentials (myUserName, pwd);
    try
                  Web
    oWeb = clientContext.Web;
    ListCollection lists = oWeb.Lists;
    List oOrderlist = clientContext.Web.Lists.GetByTitle("Order");
                    clientContext.Load<ListCollection>(lists);
                    clientContext.Load<List>(oOrderlist);
                    ListItemCreationInformation
    itemCreateInfo = new                 ListItemCreationInformation();
    ListItem oListItem = oOrderlist.AddItem(itemCreateInfo);
                    oListItem["Title"]
    = Title;                        listItem["Special_x0020_Instruction"]
    = orderRecord.Instruction;
                        listItem ["Customer"]
    = orderRecord.CustomerId;
                        listItem.Update();
                        clientContext.ExecuteQuery();
    return 1;
    catch
    return -1;
    App1.JS
    $("#Save").click(function
    debugger;
    var OrderProfile = $('#orderprofile').val();
    var CustomerId = $('#exCustomerlist').jqxComboBox('getItem',
    $('#exCustomerlist').val());
    //var Instruction = $('#instruction').val();
            alert(OrderProfile);
            alert(CustomerId);
    var obj = {
    'Title': OrderProfile,
    'Customer': CustomerId }
            $.ajax({
                url:
    "OrderService.asmx/InsertOrder",
                type:
    "POST",
                dataType:
    "json",
                data: JSON.stringify(obj),
                contentType:
    "application/json; charset=utf-8",
                beforeSend:
    function (XMLHttpRequest) {
    //Specifying this header ensures that the results will be returned as JSON.
                    XMLHttpRequest.setRequestHeader("Accept",
    "application/json");
                success:
    function (response) {
                    $(".errMsg ul").remove();
    var myObject = response.d;
                    alert(myObject);
                error:
    function (response) {
                    alert(response.status +
    ' ' + response.statusText +
    ' ' + response.responseText);
    Regards,
    Akhilesh

    Hi Alex Brassington,
    Thanks for your reply.
    I am having the Site Administrator Permission of the public site.
    I am having the permission of Company Administrator of that site but still unable to find
    Device Channel on Site Setting. still I gave the user full control from Site Permission but nothing is happening.
    What should I do next?

  • How to get the people & group field value in sharepoint 2013 editform.aspx using jquery

    i got in sharepoint 2010 by using following-
    var personfield= $("#ctl00_m_g_01cc9f37_2366_400e_aefc_afbe38c5caa5_ff51_ctl00_ctl00_UserField_upLevelDiv");
     var Assigned=personfield.find('span').attr('id');
    But,I want same for sharepoint 2013 .
    Please,tell me
    -Thanks,
    Swapnil

    Swapnil,
    See this link - 
    http://stackoverflow.com/questions/27519795/sharepoint-2013-editform-people-picker-new-value-not-saving
    http://www.sharepointcolumn.com/sp2013-setting-people-picker-value-in-newform-aspx/
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • How to add users from person or group field in a sharepoint list to sharepoint group

    Hi,
    How to add users(single or multiple) from person or group field in a sharepoint list to sharepoint group programmatically?
    Any suggestions would be appreciated.
    Thank you,
    AA.

    Hello,
    Use SPGroup.AddUser() method to add user in group. I have just written sample code in notepad so it is not tested:
    SPSecurity.RunWithElevatedPrivileges(delegate()
    using(SPSite Site = new SPSite(SPContext.Current.Site.Url))
    Using(SPWeb Web = Site.OpenWeb())
    SPList list = web.Lists["ListName"];
    SPQuery query=new SPQuery ();
    query.Query = "<Where><Eq><FieldRef Name='Title' /><Value Type='Text'>Test</Value></Eq></Where>";
    SPListItemCollection items = list.GetItems(query);
    if(items.Count > 0)
    foreach(SPListItem item in items)
    //Get USers from person or group column
    SPFieldUser userField = (SPFieldUser)item.Fields.GetField("Users");
    SPFieldUserValueCollection userFieldValueCollection = (SPFieldUserValueCollection)userField.GetFieldValue(item["Users"].ToString());
    SPGroup spGroup = spSite.RootWeb.Groups[groupName];//group name
    if (users.Count != 0)
    bool isUserInGroup = false;
    foreach (SPFieldUserValue user in users)
    foreach (SPUser item in spGroup.Users)
    string itemUserName = item.LoginName;
    string UserName = user.User.LoginName;
    if (itemUserName == UserName)
    isUserInGroup = true;
    break;
    if (!isUserInGroup)
    spGroup.AddUser(user.User);
    The above code will query list item and then get users from "Users" column. Now it will check whetehr user is already in group not, if not then add user in group.
    http://rajanijilla.blogspot.sg/2012/09/add-users-to-group-programmatically.html
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to auto populate data from one list in SharePoint 2007 into another list based on a key value?

    Hi,
    As a part of new requirement in my project I am supposd to work on SharePoint 2007. I have one List (BCExtract - Main list) with all data related to an Application (like ID, name, app manager RTO etc).
    I have created another list which has form to be filled by a user (with details about his/her applications). My requirement is that when the user enters AIT ID then the page should refresh (probably after hitting enter) and other details like Application
    name, RTO etc which is present in another list gets auto populated depending on the AIT ID (unique column) entered so reduce the burden on the user.
    Please suggest me how this can be done. I do not have permission for obtaining SharePoint Designer and I do not know JQuery. Infopath is ok but if this can be done through SharePoint 2007 alone then it would be great.
    Thanks....

    Hello,
    You can either use jquery/jaavscript or infopath form to achieve this. There is no default way to do this.
    I would suggest jquery because you can put script in newform/editfor.aspx page using content editor webpart. Refer this link for jquery:
    To get value from list:
    http://social.technet.microsoft.com/Forums/en-US/ac47fe2a-ccb6-4f5b-b274-703aecc6cb0a/get-list-items-in-sharepoint-2010-by-using-jquery
    http://www.robertkuzma.com/2010/08/read-list-items-using-sharepoint-web-services-and-jquery/
    To set value in column:
    http://paulgalvinsoldblog.wordpress.com/2009/06/13/quick-and-easy-use-jquery-to-set-a-text-field%E2%80%99s-value-on-a-sharepoint-form/
    http://spservices.codeplex.com/discussions/468729
    If you use infopath form, then you need to create two data connection to get data from both lists. Later you can set value in fields based on selection using rule. This can be possible without code.
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How to get data from subsites list of SharePoint 2010 in ssrs

    Hi,
    Can someone help me on this issue.
    I want to create a report using ssrs, I have some of the data in SQL and some of the data in sharepoint list.
    First I need to go to SQL and get the data from the table which contains URL for the subsite in sharepoint.
    after that I need to go to all the subsites and go to perticulat list in the subsites and get data from that list.
    for example, their is a top level site "abc"
    it contains sub site "123", "456","567", etc.. All this sub sites contain a list by name "Sample List", Now I need to go to that sub site list(Sample List) and get list-item column say "created By" which
    is created on particular date. 
    in my report, I need to print the sub site "url/Title" which comes from SQL database and list-item column  "Created By" of that sub site list "Sample List".
    I tried using subreport inside a report by using "Microsoft SharePoint List" as a datasource, but when it comes to real time we don't know how many subsites will be created, so we can't create a datasource for each subsite site.
    I guess we need to be using XML as a datasource, but how can we go to particular subsite in query while using XML, since all subsites have list with the same name ?
    I appreciate your help.
    Thank you,
    Kishore 

    Hi Kishore,
    SQL Server Reporting Services(SSRS) supports expression-based connection strings. This will help us to achieve the goal you mentioned in this case:
    Create a new report
    Create a Data Source in the report with the connection string like this:
    http://server/_vti_bin/lists.asmx (We use static connection string instead of expression-based connection string now, as it is not supported to get fields based on expression-based connection string in design time. We will change it to be expression-based
    connection string later)
    Create the data set(as you have done using XML query language). Please use list name instead of GUID in the listName parameter.
    Design the report(e.g. Add controls to the report)
    Now, let's change the connection string to be expression-based. First, please add a parameter to the report, move this parameter to top. This parameter is used to store the sub site name.
    Open the Data Source editor, set the connection string to be: ="http://server/" & Parameters!parameterCreatedInStep5.value & "_vti_bin/lists.asmx"
    In the main report, pass the sub site name to the report we created above via the parameter created in step5
    That is all.
    Anyway, this is actually a SQL Server Reporting Service(SSRS) question. You can get better support on this question from:
    http://social.technet.microsoft.com/Forums/en/sqlreportingservices/threads
    For more information about Expression-Based connection string, please see:
    http://msdn.microsoft.com/en-us/library/ms156450.aspx#Expressions
    If there is anything unclear, please feel free to ask.
    Thanks,
    Jinchun Chen
    Jin Chen - MSFT

  • How to show data from sharepoint list in mm dd yyyy format using Server Object Model

    In SharePoint 2010
    List "Employee", Colum Name "JoinDate" 
    has stored data in  (01/31/2014 12.00 PM) mm\dd\yyyy hr:mm PM format.
    How to display this data in mm\dd\yyyy only using C# on custom web part?

    //Write the code to read your list item
    SPListItem item = list.Items[0];
    //Get a DateTime object with the list column value
    DateTime date = Convert.ToDateTime(item["Date Column Name"]);
    String strDate = date.ToString("mm-dd-yyyy hh:mm tt");
    //you can also try ("dd/mmm/yyyy")
    http://sharepoint.stackexchange.com/questions/12820/safest-way-to-get-a-date-from-sharepoint-into-a-c-datetime-field-using-object

  • Retrieve data from a list in SharePoint 2013 provider hosted App using CSOM

    I have developed a provider hosted app in SharePoint 2013. As you already know, Visual Studio creates web application and SharePoint app. The web application gets hosted inside IIS and the SharePoint App in SharePoint site collection. I'm trying to get
    data from a list hosted in SharePoint using CSOM. But I get ran insecure content error. 
    here is my code in Default.aspx
        <script type="text/javascript" src="../Scripts/jquery-1.8.2.js"></script>
        <script type="text/javascript" src="../Scripts/MicrosoftAjax.js"></script>
        <script type="text/javascript" src="../Scripts/SP.Core.js"></script>
        <script type="text/javascript" src="../Scripts/INIT.JS"></script>
        <script type="text/javascript" src="../Scripts/SP.Runtime.js"></script>
        <script type="text/javascript" src="../Scripts/SP.js"></script>
        <script type="text/javascript" src="../Scripts/SP.RequestExecutor.js"></script>
        <script type="text/javascript" src="../Scripts/App.js"></script>
        <html xmlns="http://www.w3.org/1999/xhtml">
        <head runat="server">
            <title></title>
        </head>
        <body>
            <form id="form1" runat="server">
            <div>
                <input id="Button1" type="button" value="Get title via CSOM" onclick="execCSOMTitleRequest()" /> <br />
                <input id="Button2" type="button" value="Get Lists via CSOM" onclick="execCSOMListRequest()" />
            </div>
                <p ID="lblResultTitle"></p><br />
                <p ID="lblResultLists"></p>
            </form>
        </body>
        </html>
    and App.js is:
        var hostwebUrl;
        var appwebUrl;
        // Load the required SharePoint libraries
        $(document).ready(function () {
            //Get the URI decoded URLs.
            hostwebUrl =
                decodeURIComponent(
                    getQueryStringParameter("SPHostUrl")
            appwebUrl =
                decodeURIComponent(
                    getQueryStringParameter("SPAppWebUrl")
            // resources are in URLs in the form:
            // web_url/_layouts/15/resource
            var scriptbase = hostwebUrl + "/_layouts/15/";
            // Load the js files and continue to the successHandler
            //$.getScript(scriptbase + "/MicrosoftAjax.js",
            //   function () {
            //       $.getScript(scriptbase + "SP.Core.js",
            //           function () {
            //               $.getScript(scriptbase + "INIT.JS",
            //                   function () {
            //                       $.getScript(scriptbase + "SP.Runtime.js",
            //                           function () {
            //                               $.getScript(scriptbase + "SP.js",
            //                                   function () { $.getScript(scriptbase + "SP.RequestExecutor.js", execCrossDomainRequest); }
        function execCrossDomainRequest() {
            alert("scripts loaded");
        function getQueryStringParameter(paramToRetrieve) {
            var params = document.URL.split("?")[1].split("&");
            var strParams = "";
            for (var i = 0; i < params.length; i = i + 1) {
                var singleParam = params[i].split("=");
                if (singleParam[0] == paramToRetrieve)
                    return singleParam[1];
        function execCSOMTitleRequest() {
            var context;
            var factory;
            var appContextSite;
            var collList;
            //Get the client context of the AppWebUrl
            context = new SP.ClientContext(appwebUrl);
            //Get the ProxyWebRequestExecutorFactory
            factory = new SP.ProxyWebRequestExecutorFactory(appwebUrl);
            //Assign the factory to the client context.
            context.set_webRequestExecutorFactory(factory);
            //Get the app context of the Host Web using the client context of the Application.
            appContextSite = new SP.AppContextSite(context, hostwebUrl);
            //Get the Web
            this.web = context.get_web();
            //Load Web.
            context.load(this.web);
            context.executeQueryAsync(
                Function.createDelegate(this, successTitleHandlerCSOM),
                Function.createDelegate(this, errorTitleHandlerCSOM)
            //success Title
            function successTitleHandlerCSOM(data) {
                $('#lblResultTitle').html("<b>Via CSOM the title is:</b> " + this.web.get_title());
            //Error Title
            function errorTitleHandlerCSOM(data, errorCode, errorMessage) {
                $('#lblResultLists').html("Could not complete CSOM call: " + errorMessage);
        function execCSOMListRequest() {
            var context;
            var factory;
            var appContextSite;
            var collList;
            //Get the client context of the AppWebUrl
            context = new SP.ClientContext(appwebUrl);
            //Get the ProxyWebRequestExecutorFactory
            factory = new SP.ProxyWebRequestExecutorFactory(appwebUrl);
            //Assign the factory to the client context.
            context.set_webRequestExecutorFactory(factory);
            //Get the app context of the Host Web using the client context of the Application.
            appContextSite = new SP.AppContextSite(context, hostwebUrl);
            //Get the Web
            this.web = context.get_web();
            // Get the Web lists.
            collList = this.web.get_lists();
            //Load Lists.
            context.load(collList);
            context.executeQueryAsync(
                Function.createDelegate(this, successListHandlerCSOM),
                Function.createDelegate(this, errorListHandlerCSOM)
            //Success Lists
            function successListHandlerCSOM() {
                var listEnumerator = collList.getEnumerator();
                $('#lblResultLists').html("<b>Via CSOM the lists are:</b><br/>");
                while (listEnumerator.moveNext()) {
                    var oList = listEnumerator.get_current();
                    $('#lblResultLists').append(oList.get_title() + " (" + oList.get_itemCount() + ")<br/>");
            //Error Lists
            function errorListHandlerCSOM(data, errorCode, errorMessage) {
                $('#lblResultLists').html("Could not complete CSOM Call: " + errorMessage);
    Any solution is appreciated.

    Hi,
    To retrieve data from list in your provider-hosted app using SharePoint Client Object Model(CSOM), you can follow the links below for a quick start:
    http://msdn.microsoft.com/en-us/library/office/fp142381(v=office.15).aspx
    http://blogs.msdn.com/b/steve_fox/archive/2013/02/22/building-your-first-provider-hosted-app-for-sharepoint-part-2.aspx
    Best regards
    Patrick Liang
    TechNet Community Support

  • Excel Services with SharePoint List Data in SharePoint 2013 - Chart is not refreshing automatically

    Hi Everyone,
    This is My req: I m going to display pie chart and Bar chart in share point 2013.
    Steps I have follwed:
    1. Export the list to excel.
    2.Using the Power Pivot table I have done the chart.
    3. Uploaded into document Library.
    4. Added into the web part. 
    Chart are displaying. But When ever user added the data into the list chart is refreshing.
    Is there any option to refresh the data in chart? Waiting for valuable replies.
    Regards, Manoj Prabakar

    SharePoint lists as data sources in Excel Services is not supported.That's the reason refreshing is not working. There are some work around you can use  -
    Export as Data Feed - Export your SharePoint list as Data Feed , use this data feed to a PowerPivot for Excel workbook and publish this PowerPivot using Excel Services.
    User-defined functions  - write UDF in C# and extend the Excel Services functionality to work with SharePoint lists.
    https://msdn.microsoft.com/library/bb267252(office.12).aspx#Office2007ExcelServicesUnlimited_SharePointLists
    Web Services API -
    The Web Services API can be used to push data from a database and then refresh the data in a SharePoint Server list by using Excel Services.
    JavaScript Object Model - The JavaScript Object Model for Excel Services in Microsoft SharePoint Server 2010 provides many solutions for Excel Services.
    More details  - 
    https://technet.microsoft.com/en-us/library/gg576960.aspx
    Thanks
    Ganesh Jat [My Blog |
    LinkedIn | Twitter ]
    Please click 'Mark As Answer' if a post solves your problem or 'Vote As Helpful' if it was useful.

  • Error occurs when I open the tasks list in MS Project Professional 2013 from SharePoint 2013

    Hi,
    I have created a SharePoint 2010 workflow for a tasks list that updates a list item column if the Date Complete <= Today's date & Percentage Complete = 100%
    I used 'Set Field in Current Item' in the workflow & the values are updated in the list for the current item.
    However, when I open the tasks list in MS Project Professional 2013 from SharePoint 2013, then I get a error "We can't write task - taskname to the SharePoint site. This is either because tasks list is in read only mode or because this task has a column
    that requires unique value."
    If I remove the 'Set Field in Current Item' in the workflow, then the error does not occur. However, the 'Set Field in Current Item' in the workflow is required.
    Please provide solution to this issue ASAP. Your reply will be greatly appreciated.
    Thanks in advance

    Hi Jack,
    A shot in the dark here.  I'm not convinced the error is from the workflow.  What is the definition of the list item column in SharePoint?  Have you set the column to requiring a unique vale?  Look at the column definition.

  • I pull fiftyfour bytes of data from MicroProcessor's EEPROM using serial port. It works fine. I then send a request for 512 bytes and my "read" goes into loop condition, no bytes are delivered and system is lost

    I pull fiftyfour bytes of data from MicroProcessor's EEPROM using serial port. It works fine. I then send a request for 512 bytes and my "read" goes into loop condition, no bytes are delivered and system is lost

    Hello,
    You mention that you send a string to the microprocessor that tells it how many bytes to send. Instead of requesting 512 bytes, try reading 10 times and only requesting about 50 bytes at a time.
    If that doesn�t help, try directly communicating with your microprocessor through HyperTerminal. If you are not on a Windows system, please let me know. Also, if you are using an NI serial board instead of your computer�s serial port, let me know.
    In Windows XP, go to Start, Programs, Accessories, Communications, and select HyperTerminal.
    Enter a name for the connection and click OK.
    In the next pop-up dialog, choose the COM port you are using to communicate with your device and click OK.
    In the final pop
    -up dialog, set the communication settings for communicating with your device.
    Type the same commands you sent through LabVIEW and observe if you can receive the first 54 bytes you mention. Also observe if data is returned from your 512 byte request or if HyperTerminal just waits.
    If you do not receive the 512 byte request through HyperTerminal, your microprocessor is unable to communicate with your computer at a low level. LabVIEW uses the same Windows DLLs as HyperTerminal for serial communication. Double check the instrument user manual for any additional information that may be necessary to communicate.
    Please let me know the results from the above test in HyperTerminal. We can then proceed from there.
    Grant M.
    National Instruments

  • Group xml data from different sql queries in data template

    Hello,
    I need to do a mailing program with bursting that sends differents alerts in one mail.
    For example i can have alerts for late orders, alerts for shipping not confirmed, so really different address (I dont want to use union). I have done three sql statement in data template , it gives the following ouput.
    <GA_EMAIL>[email protected]</GA_EMAIL>
    <G_ALERTS_1>
    <ALERT>
    </ALERT>
    <ALERT>
    </ALERT>
    </G_ALERTS_1>
    </GA_EMAIL>
    <GA_EMAIL>[email protected]</GA_EMAIL>
    <G_ALERTS_1>
    <ALERT>
    </ALERT>
    </G_ALERTS_1>
    </GA_EMAIL>
    <GA_EMAIL>[email protected]</GA_EMAIL>
    <G_ALERTS_2>
    </G_ALERTS_2>
    </GA_EMAIL>
    I woud like the bursting or data template to group alerts when email is the same, because here it sends an email for each different alert.
    Ideal output would be:
    <GA_EMAIL>[email protected]</GA_EMAIL>
    <G_ALERTS_1>
    <ALERT>
    </ALERT>
    <ALERT>
    </ALERT>
    </G_ALERTS_1>
    <G_ALERTS_2>
    </G_ALERTS_2>
    </GA_EMAIL>
    But I don't know how to group different sql statements on a common field (email)
    Any ideas ?
    Thanks

    the for-each group works well in a rtf template, but the rtf template is only applied after the bursting (in order I get first data template (instead of a report) -> bursting -> rtf template)
    I want to be able to group xml data from the data template, so I can do bursting (by email ) but only once per mail.

  • Fastest way to get data from Multiple lists across multiple site collections

    HI
    I need to get data from multiple lists which spread across 20 site collections and need to show it as list view.
    I have searched on internet about this and got some info like options would be to use search core APIs or BCS . I can't use search because I want real time data. Not sure of any other ways.
    if anybody can provide ideas it would be help.

    Might LINQ be an option for you?  Using
    LINQPad and the
    SharePoint Connector, you should be able to write a query that'll retrieve this data, from which you can tabulate it.  I'm not sure how you'd be able to automate this any further so that it's then imported in as list.
    For something more specific, I used a third party tool called the
    Lightning Tools Lightning Conductor, which is essence a powerful content roll-up tool.  In one of my solutions, I created a calculated column that gave an order / ranking on each item, so that when lists were combined, they'd still have some form of
    order.  The web part is also fairly customisable and has always proven a useful tool.
    Hope that helps.
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • Retrieve Title field values from multiple lists and add into another list

    Hi , Iam trying to retrieve Title field value from multiple lists. and add them into another list. using Javascript. Can any one help me in doing this. Below is the code.. function save() { clientContext = new SP.ClientContext.get_current(); oWebsite = clientContext.get_web(); oList = clientContext.get_web().get_lists().getByTitle('MainList'); clientContext.load(oList); clientContext.executeQueryAsync(OnSucceeded, onQueryFailed); } function GetListItemValue(listName, fieldName) { var list = oWebsite.get_lists().getByTitle(listName); var eventValue = document.getElementById(fieldName).value; eventValue = eventValue.replace(",", ""); var camlQuery = new SP.CamlQuery(); var filterdata = '<view><query><where><eq><fieldref name="Title/"><value type="Text">' + myreqValue.trim() + '</value></fieldref></eq></where></query></view>'; camlQuery.set_viewXml(filterdata); listItems = list.getItems(camlQuery); clientContext.load(list); clientContext.load(listItems, 'Include(Id)'); clientContext.executeQueryAsync(Succeeded,Failed); } function OnSucceeded() { itemCreateInfo = new SP.ListItemCreationInformation(); oListItem = oList.addItem(itemCreateInfo); oListItem.set_item('Title', 'My New Title'); var deptItemLookupField = new SP.FieldLookupValue(); //Problem in below line...I was unable to get ID var getId = GetListItemValue("Listname1", "txtboxname1"); alert("ID" + getId); if (getId != undefined) { deptItemLookupField.set_lookupId(getId); } var getId12 = GetListItemValue("Listname12", "txtboxname12"); alert("ID" + getId12); if (getId12 != undefined) { deptItemLookupField.set_lookupId(getId12); } oListItem.update(); clientContext.executeQueryAsync(itemadded, itemFailed); } function itemadded() { alert('Item added successfully'); } function itemFailed(sender, args) { alert('Item added itemFailed' + args.get_message() + '\n' + args.get_stackTrace()); }
    Raj

    Hi,
    For this requirement, you will need to retrieve all the lists objects you want firstly, then execute the requests one by one to get the value of the Title column using CAML or
    LINQ.
    How to: Retrieve Lists Using JavaScript
    http://msdn.microsoft.com/en-us/library/office/hh185009(v=office.14).aspx
    About
    retrieve list items:
    http://msdn.microsoft.com/en-us/library/office/hh185007(v=office.14).aspx
    You can use
    Promise in your script to make your requests sequentially:
    http://www.shillier.com/archive/2013/03/04/using-promises-with-the-javascript-client-object-model-in-sharepoint-2013.aspx
    http://www.learningsharepoint.com/2013/08/13/using-deferred-and-promise-to-handle-async-calls-in-sharepoint-client-object-model/
    Best regards
    Patrick Liang
    TechNet Community Support

  • The problem here is i am not able to get the data from the list

    hi all,
    i have the following code
    EnrichedProductCatalogue enrichedProductCatalogue1 = new EnrichedProductCatalogue();
    enrichedProductCatalogue1.setAssetCount(2);
    enrichedProductCatalogue1.setBlockingProduct("Weekend Freebee");
    enrichedProductCatalogue1.setBlockingReason("Compatability");
    ArrayList<String> availableActionsList = new ArrayList<String>();
    availableActionsList.add(EnrichedProductConstants.ADD.toString());
    availableActionsList.add(EnrichedProductConstants.REMOVE.toString());
    enrichedProductCatalogue1.setAvailaibleActions((ArrayList<String>)availableActionsList);
    BundleProduct bundleProduct = null;
    Product product = new Product();
    product = new Product();
    product.setProductName("International");
    product.setProductClassName("International");
    ArrayList<UiCategory> uiCategory = new ArrayList<UiCategory>();
    UiCategory uiCategory1 = new UiCategory();
    uiCategory1.setCategoryName("Simply");
    UiCategory uiCategory2 = new UiCategory();
    uiCategory2.setCategoryName("Freebees");
    uiCategory.add(uiCategory1);
    uiCategory.add(uiCategory2);
    product.setUiCategory(uiCategory);
    bundleProduct = new BundleProduct();
    bundleProduct.setCommercialProduct(product);
    enrichedProductCatalogue1.setBundleProduct(bundleProduct);
    listOfEnrichProducts.add(enrichedProductCatalogue1);
    listOfEnrichProducts.add(enrichedProductCatalogue1);
    here i have an list called listOfEnrichProducts.
    here i am adding two objects of enrichedProductCatalogue.
    which contains a object called BundleProduct.
    which has a reference for Product class.
    here this product class has a list which contains objects of another class called UiCategory.
    the problem here is i am not able to get the data from the list which contains UiCategory objects .
    the following is the UI
    <af:table var="row" rowBandingInterval="0" id="t1"
    value="#{pageFlowScope.sample1}"
    binding="#{pageFlowScope.sampleManagedBean.dataTable}"
    partialTriggers="apimethods ::apimethods">
    <af:column sortable="false" headerText="ProductName" id="c2">
    <af:outputText value="#{row.bundleProduct.commercialProduct.productName}" id="ot15"/>
    </af:column>
    <af:column sortable="false" headerText="ProductClass" id="c12">
    <af:outputText value="#{row.bundleProduct.commercialProduct.productClassName}" id="ot19"/>
    </af:column>
    <!--
    <af:column sortable="false" headerText="UICategoryName" id="c32">
    <af:forEach var="item" items="#{row.bundleProduct.commercialProduct.uiCategory}" >
    <af:outputText value="#{item.categoryName}" id="ot119"/>
    </af:forEach>
    </af:column>
    -->
    <af:column sortable="false" headerText="AssetCount" id="c22">
    <af:outputText value="#{row.assetCount}" id="ot1"/>
    </af:column>
    <af:column sortable="false" headerText="blockingReason" id="c3">
    <af:outputText value="#{row.blockingReason}" id="ot2"/>
    </af:column>
    <af:column sortable="false" headerText="blockingProduct" id="c4">
    <af:outputText value="#{row.blockingProduct}" id="ot3"/>
    </af:column>
    <!--<af:column sortable="false" headerText="availaibleActions" id="c1">
    <af:commandButton text="#{row.availaibleActions}" id="cb1"
    actionListener="#{pageFlowScope.sampleManagedBean.callAction}"
    partialSubmit="true">
    <af:setPropertyListener from="#{row.availaibleActions}"
    to="#{pageFlowScope.avalibleaction}" type="action"/>
    </af:commandButton>
    </af:column>-->
    </af:table>
    Can anyone pls give some solution ...

    Hi Frank,
    value="#{pageFlowScope.sample1}"
    here sample is
    Map<String, Object> flowScope1 =
    ADFContext.getCurrent().getPageFlowScope();
    flowScope.put("sample1", listOfEnrichProducts);
    this is not the problem . i am able to get all the values except the following .
    ArrayList<UiCategory> uiCategory = new ArrayList<UiCategory>();
    UiCategory uiCategory1 = new UiCategory();
    uiCategory1.setCategoryName("Simply");
    UiCategory uiCategory2 = new UiCategory();
    uiCategory2.setCategoryName("Freebees");
    uiCategory.add(uiCategory1);
    uiCategory.add(uiCategory2);
    product.setUiCategory(uiCategory);

Maybe you are looking for

  • Creating a PO when a sales order is created

    Hi, Can anyone guide how this requirement can be achieved. For  both scenarios there should be no manual intervention. This is not a third party scenario. When a sales order is created then a purchase order should be created in same server and       

  • An unexpected error occurred (4:190). Your firmware could not be updated, please try again.

    hi i get in my MacPro: An unexpected error occurred (4:190). Your firmware could not be updated, please try again. So which can i do ? Im looking you to forward

  • SOFM create mulitple entrance in the document content

    Hi @ all How could I create multiple entrances in the DocumentContent? Since now I'm binding the different elements (in my case 4 different container elements) to the DocumentContent, but after this task there is only one entrance. I think I delete t

  • Work Schedule vs BG_ABSENCE_DURATION

    Hi, If I have Work Schedule functionality working, do I need to configure BG_ABSENCE_DURATION Fast Formula as well ? I know I can calculate the duration based on the logic in BG_ABSENCE_DURATION fast formula. But If I have the work schedule functiona

  • What is the location of these files in R12

    Hi, I want to know the location of the following files in R12 httpd_pls.conf oprocmgr.conf jserv.properties i know that pls is obsolete in R12. But in the followingdocument (Page no. 17 and 18) which says i need to add some paramters in these files.