Unexpected "Microsoft.SharePoint.SPListDataValidationException: List data validation failed."

Steps to replicate (I suspect it can be replicated with any list, not just a survey):
1. Create a survey
2. Go to Survey Settings / Validation Settings, enter a formula and a user message.
3. Respond to a survey. 
3.1. If a formula validation succeeds, a new survey response is created.
3.2. If a formula validation fails, I expect to see a user message created in step #2 above. Instead, I see an exception:
 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Microsoft.SharePoint.SPListDataValidationException: List data validation failed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SPListDataValidationException: List data validation failed.]
Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Boolean bAdd, Boolean bSystem, Boolean bPreserveItemVersion, Boolean bNoVersion, Boolean bMigration, Boolean bPublish, Boolean bCheckOut, Boolean bCheckin, Guid newGuidOnAdd, Int32& ulID, Object& objAttachmentNames, Object& objAttachmentContents, Boolean suppressAfterEvents, String filename) +25667234
Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents, String filename) +25664366
Microsoft.SharePoint.WebControls.SaveButton.OnBubbleEvent(Object source, EventArgs e) +938
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +70
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981
Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927 
Server Error in '/' Application.
List data validation failed.

Look for -- <xsl:template name="dvt_1"> in your edit/new form using designer.
Place
<sharepoint:itemvalidationfailedmessage
id="checkform" ControlMode="New"
runat="server">
..right underneath<Sharepoint:ItemHiddenVersion>
ControlMode depends on what type of form you are working on. (New/Edit)
GooLuck

Similar Messages

  • List data validation failed when creating a new list item but does not fail when editing an existing item

    Dear SharePoint Experts,
    Please help.
    Why does my simple formula work in Excel but not-work in SharePoint?
    Why does this formula...
    =IF([Request Type]="Review",(IF(ISBLANK([Request Date]),FALSE,TRUE)),TRUE)
    ...work in Excel but fail when I try to use it in SharePoint?
    The intent of this formula is the following...
    If the field "Request Type" has the value "Review" and the field "Request Data" is blank then show FALSE, otherwise show TRUE.
    SharePoint saves the formula, but when a list item is saved where the formula is implemented, (under List Settings, List Validation), SharePoint does not, say anything other than that the formula failed.
    Note that the "list data validation failed" error only happens when I am creating a new item-- the formula above works just fine when one is trying to Save on the edit form. 
    Can you help?
    Thanks.
    -- Mark Kamoski

    Dear Jason,
    I appreciate your efforts.
    However, it seems to me that this statement of yours is not correct...
    "If it meet the validation formula, then you can new or edit the item, otherwise, it will throw the 'list data validation failed' error, it is by design".
    I believe this is NOT the answer for the following reasons.
    When I create a new item and click Save, the validation error is "list data validation failed".
    When I edit an existing item and click Save, the validation error is "my custom error message" and this is, I believe, the way it needs to work each time.
    I think, at the core, the error my formula does not handle some condition of null or blank or other default value.
    I tried a forumla that casts the date back to a string, and then checked the string for a default value, but that did not work.
    I tried looking up the Correlation ID in the ULS when "list data validation failed" occurs, but that gave no useful information because, even though logging was set to Verbose, the stack trace in the error log was truncated and did not given any
    good details.
    However, it seems to me that SharePoint 2013 is not well-suited for complex validation rules, because...
    SharePoint 2013 list-level validation (NOT column-level validation) allows only 1 input for all the multi-field validation formulas in a given list-- so, if I had more than 1 multi-field validation rule to implement on a given list, it would need to be packed
    into that single-line-of-code forumla style, like Excel does. That is not practice to write, debug, or maintain.
    SharePoint 2013 list-level validation only allows 1 block of text for all such multi-field validation rules. So that will not work because I would have something like "Validation failed for one or more of the following reasons-- withdrawal cannot exceed
    available balance, date-of-birth cannot be after date-of-death,... etc". That will not work for me.
    The real and awesome solution would simply be enhancing SP 2013 so that column-level validation forumlas are able to reference other columns.
    But, for now, my workaround solution is to use JavaScript and jQuery, hook the onclick handler on the Save button, and that works good. The only problem, is that the jQuery validation rules run before any of the column-level rules created  with OOTB
    SP 2013. So, in some cases, there is an extra click for the enduser.
    Thanks,
    Mark Kamoski
    -- Mark Kamoski

  • List Data Validation failed error

    I'm getting the following error "List data validation failed." while trying to upload a document which already exists.
    My Document library settings : Enabled Version Settings (Major), 
    Require documents to be checked out before they can be edited : YES,
    Validation Formula : =[End Date]>=TODAY()
    If I upload a new document  to the document library, everything is
    working fine. If I edit properties of the ListItem everything works fine. The system throws error only when I upload already existing document.
    If i make "Require documents to be checked out before they can be edited : NO" , then everything is fine. But business requirement forces me to do checkout.
    Also if i change the Validation Formula : =[End Date]<=TODAY() , then everything works fine.

    Hey Jatin,
    unfortunately the check out before editing = true is against using the same document before overwrite.
    as long as this is a business needs, i advise you to make a user control to be your document library upload form
    while uploading the document, you can check this document out programmatically and the library settings will do the overwrite for you
    also the validation will be easier when you check it programmatically 
    i hope this help, let me know if you need more clarifications 
    Ahmed Said Moussa SharePoint Consultant

  • Microsoft SharePoint Foundation Usage Data Import Timer Job Fails on two of six servers

    Starting about one week ago this timer job started to fail on my two WFE's in a newly implemented SP2013 Farm, the ULS error and verbose details are below..Thanks.
    03/19/2015 15:55:58.54 OWSTIMER.EXE (0x30D4) 0x7748 SharePoint Foundation Timer 6398 Critical The Execute method of job definition
    Microsoft.SharePoint.Administration.SPUsageImportJobDefinition (ID 676104fa-9a64-4936-a6cd-986223176db5) threw an exception. More information is included below. Index was outside the bounds of the array.
    825cf49c-2b6d-a0a5-c45a-88e7d3e4ed5d
    03/19/2015 15:55:58.54 OWSTIMER.EXE (0x30D4) 0x7748 SharePoint Foundation Timer 72ae Unexpected Exception stack trace: at
    Microsoft.SharePoint.Administration.SPAnalyticsUsageDefinition.ParseLogFileEntry(String line) at Microsoft.SharePoint.Administration.SPUsageLogImporter.ImportUsageLogFile(SPUsageProvider usageProvider,
    FileInfo logFileInfo) at Microsoft.SharePoint.Administration.SPUsageLogImporter.ImportUsageLogFiles(SPUsageProvider usageProvider, String logDirName, List`1 usageLogFileList) at
    Microsoft.SharePoint.Administration.SPUsageLogImporter.ImportUsageData(SPUsageManager usageManager, DirectoryInfo usageLogDirInfo, String fileFilter) at
    Microsoft.SharePoint.Administration.SPUsageLogImporter.ImportUsageData() at Microsoft.SharePoint.Administration.SPUsageImportJobDefinition.Execute(Guid targetInstanceId) at
    Microsoft.SharePoint.Administration.SPTimerJobInvokeInternal.Invoke(SPJobDefinition jd, Guid targetInstanceId, Boolean isTimerService, Int32& result) 825cf49c-2b6d-a0a5-c45a-88e7d3e4ed5d

    Hi,
    Could you please locate more relevant error information in ULS log to help troubleshooting?
    If you go to Central Administration > Monitoring > Job History, change it to Failed Jobs, check if there are entries for the timer job
    Microsoft SharePoint Foundation Usage Data Import Timer Job. Also try restart the timer job.
    Regards,
    Rebecca Tu
    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]

  • Store sharepoint 2010 list data in sql server

    Hi,
    I want to store sharepoint list data to sql server database.
    SO can anyone guide how can i attach my sharepoint 2010 with sql server 2008.
    Please help to solve the issue.
    Thanks in advance.
    Regards
    Rajni

    Hi,
    The screenshot indicates that SharePoint Designer is crashing when trying to add new External Content Type.
    Remove the SharePoint Designer and reinstall it to check the result.
    Microsoft Business Connectivity Services (BCS) enables users to read and write data from external systems—through Web services, databases, and Microsoft .NET Framework assemblies—from within Microsoft SharePoint 2010 and Microsoft Office
    2010 applications.
    There are lots of blog articles showing how to configure BCS in SharePoint 2010. You can start from:
    Understanding Business Connectivity Services
    http://blogs.msdn.com/b/sharepointdev/archive/2011/12/26/understanding-business-connectivity-services.aspx
    Using Business Connectivity Services in SharePoint 2010
    http://msdn.microsoft.com/en-us/magazine/ee819133.aspx
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Consuming SharePoint 2010 Lists Data in the SSRS 2008 R2 Reports

    When I am trying to create a report using SharePoint 2010 List I am getting error.
    Firstly I opened SQL BI Development Studio, then created Shared DataSource then created Report.
    Then from Report Data pane created Data Source and all was Ok
    But when I am creating DataSet for the SharePoint 2010 List and when clicking on Query Builder and running the query I am getting following error:
    "Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown".
    Now what should I do next to connect my SharePoint List.

    What's your SOAP call look like for the webservice?
    Brandon James SharePoint Developer/Administrator

  • How do I pull SharePoint 2013 list data using a SQL Query

    I have been asked to write a sql query to pull data from a SharePoint 2013  List.it needs to return all the columns
    Basically a Select all from the specific SharePoint list Database
    I do have the  list GUID ID. But not sure  which  SQL Table or Database to look in for list data.. the site and the list is in our main SharePoint site collection.
    the query only needs to be saved in SQL server

    I know it isn't support but sometimes you have to share data with other programs....
     I'm stuck.. I was able to get this far...
    SELECT * FROM dbo.Lists
    where tp_Title ='List Name'
     how do I pull the columns of the list?
    I think I still need the specific list not just the master list dbo....
    those two links do not work for SQL server  and SharePoint 2013

  • Power Pivot 2013 Using SharePoint 2013 List as Source Data

    Background: On a SharePoint 2013 site, there are lists that have the exact same columns but due to their size I had to create a different list for each year.
    These are essentially my data lists or tables that end users enter data into. These lists have look up columns in them, referencing columns from look up lists or tables located on the same site.
    Goals:
    1) Create a Power Pivot Gallery on SharePoint 2013 that is able to leverage the "manage data refresh" feature using the SharePoint 2013 List data that is on the same SharePoint 2013 site.  
    2) Combine all the data lists/tables into one table once in Power Pivot 2013. The Look Up lists/tables will remain separate.
    Challenge: Being able to merge or do a union query to the "data lists" and still maintain the ability to leverage the "manage data refresh" feature. 
    This is a tactical, quick fix solution, and I
    cannot use SQL Server and am operating under the assumption that I do not have Access Services 2013 as an option.  
    Failed Attempt #1: What I already tried was linking the lists to an Access 2013 database and did a Union query from Power Pivot which merged the data from the different data tables
    as I wanted it to. Then I uploaded that Access Database to a document library on that same site, thinking that I could maintain the ability to leverage the "manage data refresh" feature but I was wrong.
    Any thoughts or suggestions? 
    Thanks in advance for any help!
    Cheers, Johnny
    Johnny

    You can connect to SharePoint Lists using Power Query (and of course Union multiple Lists and more using Pwer Query) - but Automatic refresh would not work with SharePoint. Power BI (Cloud service) allows auto refresh of Power Query, but not on SharePoint.
    Hopefully some day soon.
    Regards, Avi
    www.powerpivotpro.com
    Wiki:How to ask a Power Pivot Question to get a prompt, accurate and helpful response

  • Sharepoint 2013 search error - The search application 'Search Service Application 1' on server is not provisioned.Confirm that the Microsoft SharePoint Foundation Timer service and Central Administration service are running on the server.

    Hi All,
    I'm getting the below error in My SHarepoint 2013 search Administration page.
    Crawler background activity - The search application 'Search Service Application 1' on server ""  is not provisioned. Confirm that the Microsoft SharePoint Foundation Timer service and Central Administration service are running
    on the server.
    and when i click on Crawl Log and content source
    it throws the below error
    The search service is currently offline. Visit the Services on Server page in SharePoint Central Administration to verify whether
    the service is enabled. This might also be because an indexer move is in progress
    When i check the search status
    Get-SPEnterpriseSearchServiceInstance, it shows all the components are online.
    As of now search service application is online and search is working.But not sure why it throws the above error.
    I have restarted timer service,search service in services.msc and cleared the sharepoint cache as well.
    But no luck,This is happening in my prodcution environment.
    Any help will be greatly appreciated.
    There are the logs i have found
    05/23/2014 13:03:22.71 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (GET:http://dca-app-617:90/_admin/search/listcontentsources.aspx?appid=e830c1b3%2Dc3e4%2D4097%2D85fd%2Daa5248346d2e) d4c6939c-b10d-4000-6d95-14caeefe67df
    05/23/2014 13:03:22.71 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation Authentication Authorization agb9s Medium Non-OAuth request. IsAuthenticated=True, UserIdentityName=, ClaimsCount=0 d4c6939c-b10d-4000-6d95-14caeefe67df
    05/23/2014 13:03:22.73 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation Logging Correlation Data xmnv Medium Site=/ d4c6939c-b10d-4000-6d95-14caeefe67df
    05/23/2014 13:03:22.79 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Server Search Administration djs2 High [Forced due to logging gap, cached @ 05/23/2014 13:03:22.76, Original Level: VerboseEx] {0} d4c6939c-b10d-4000-6d95-14caeefe67df
    05/23/2014 13:03:22.79 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Server Database 8acb High [Forced due to logging gap, Original Level: VerboseEx] Reverting to process identity d4c6939c-b10d-4000-6d95-14caeefe67df
    05/23/2014 13:03:22.80 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Server Search Administration djj1 High Unable to find application 'b9c8106c-c7ed-4eb3-96c9-ae1881ffb695' d4c6939c-b10d-4000-6d95-14caeefe67df
    05/23/2014 13:03:22.82 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Server Search Administration djj1 High Unable to find application 'b9c8106c-c7ed-4eb3-96c9-ae1881ffb695' d4c6939c-b10d-4000-6d95-14caeefe67df
    05/23/2014 13:03:22.82 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation General 8nca Medium Application error when access /_admin/search/listcontentsources.aspx, Error=The search service is currently offline. Visit the Services
    on Server page in SharePoint Central Administration to verify whether the service is enabled. This might also be because an indexer move is in progress.   at Microsoft.Office.Server.Search.Internal.UI.SearchCentralAdminPageBase.ErrorHandler(Object
    sender, EventArgs e)     at Microsoft.Office.Server.Search.Internal.UI.SearchCentralAdminPageBase.OnError(EventArgs e)     at System.Web.UI.Page.HandleError(Exception e)     at System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()    
    at System.Web.UI.Page.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep
    step, Boolean& completedSynchronously) d4c6939c-b10d-4000-6d95-14caeefe67df
    05/23/2014 13:03:22.82 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation Runtime tkau Unexpected Microsoft.SharePoint.SPException: The search service is currently offline. Visit the Services on Server page in SharePoint Central
    Administration to verify whether the service is enabled. This might also be because an indexer move is in progress.    at Microsoft.Office.Server.Search.Internal.UI.SearchCentralAdminPageBase.ErrorHandler(Object sender, EventArgs e)    
    at Microsoft.Office.Server.Search.Internal.UI.SearchCentralAdminPageBase.OnError(EventArgs e)     at System.Web.UI.Page.HandleError(Exception e)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
    Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()    
    at System.Web.UI.Page.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep
    step, Boolean& completedSynchronously) d4c6939c-b10d-4000-6d95-14caeefe67df
    05/23/2014 13:03:22.82 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation General ajlz0 High Getting Error Message for Exception Microsoft.SharePoint.SPException: The search service is currently offline. Visit the Services on
    Server page in SharePoint Central Administration to verify whether the service is enabled. This might also be because an indexer move is in progress.     at Microsoft.Office.Server.Search.Internal.UI.SearchCentralAdminPageBase.ErrorHandler(Object
    sender, EventArgs e)     at Microsoft.Office.Server.Search.Internal.UI.SearchCentralAdminPageBase.OnError(EventArgs e)     at System.Web.UI.Page.HandleError(Exception e)     at System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()    
    at System.Web.UI.Page.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep
    step, Boolean& completedSynchronously) d4c6939c-b10d-4000-6d95-14caeefe67df
    05/23/2014 13:03:22.82 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation General aat87 Monitorable  d4c6939c-b10d-4000-6d95-14caeefe67df
    05/23/2014 13:03:22.82 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation DistributedCache ah24q Unexpected SPDistributedCachePointerWrapper::InitializeDataCacheFactory - No cache hosts are present in the farm. d4c6939c-b10d-4000-6d95-14caeefe67df
    05/23/2014 13:03:22.82 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation DistributedCache ah24w Unexpected Unexpected Exception in SPDistributedCachePointerWrapper::InitializeDataCacheFactory for usage 'DistributedViewStateCache'
    - Exception 'System.InvalidOperationException: SPDistributedCachePointerWrapper::InitializeDataCacheFactory - No cache hosts present in the farm.     at Microsoft.SharePoint.DistributedCaching.SPDistributedCachePointerWrapper.InitializeDataCacheFactory()'. d4c6939c-b10d-4000-6d95-14caeefe67df
    05/23/2014 13:03:22.82 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation General ajb4s Monitorable ViewStateLog: Failed to write to the velocity cache:
    http://dca-app-617:90/_admin/search/listcontentsources.aspx?appid=e830c1b3-c3e4-4097-85fd-aa5248346d2e d4c6939c-b10d-4000-6d95-14caeefe67df
    05/23/2014 13:03:22.82 w3wp.exe (0x46E70) 0x4CBA4 SharePoint Foundation Monitoring b4ly Medium Leaving Monitored Scope (Request (GET:http://dca-app-617:90/_admin/search/listcontentsources.aspx?appid=e830c1b3%2Dc3e4%2D4097%2D85fd%2Daa5248346d2e)).
    Execution Time=109.695855199474 d4c6939c-b10d-4000-6d95-14caeefe67df
    Anil Loka

    Please try below mentioned steps:
    1. Central Administration > Monitoring > Review job definitions > Look for following timer job "Application Server Administration Service Timer Job" > Disable
    2. Then open windows administrative services (services.msc), stop SharePoint Timer Service
    3. Clear SharePoint Timer configuration cache by following steps mentioned in below blog:
    http://blogs.msdn.com/b/jamesway/archive/2011/05/23/sharepoint-2010-clearing-the-configuration-cache.aspx
    4. Start SharePoint Timer Service and give it a few seconds so that the new XML files from the location you deleted then are re-populated.
    5.Central Administration > Monitoring > Review job definitions > Look for following timer job "Application Server Administration Service" Timer Job > Enable
    Please ensure that you mark a question as Answered once you receive a satisfactory response.

  • SharePoint Provider Hosted App that can update existing SharePoint Task List

    Note: I am unable to take advantage of the Microsoft.SharePoint library directly. Adding a reference results in a 32bit/64bit library mismatch error.
    I have to find a solution that uses only the Microsoft.SharePoint.Client extension. 
    I am looking for example code where provider-hosted SharePoint App loads a SharePoint Task List View that allows users to interact with the tasks.
    So far I have only been able to programmatically create and then load the SharePoint tasks list, create and populate a DataTable object and set the datasource of a GridView object to that DataTable.
    I am unable to trigger my method linked to my checkbox within the gridview.
    Ideally I would like to just customize a Task View that already has this functionality.
    Here is my default.aspx.cs code-behind file:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Data;
    using SP = Microsoft.SharePoint.Client;
    namespace SPAppBasicWeb
    public partial class Default : System.Web.UI.Page
    protected void Page_PreInit(object sender, EventArgs e)
    Uri redirectUrl;
    switch (SharePointContextProvider.CheckRedirectionStatus(Context, out redirectUrl))
    case RedirectionStatus.Ok:
    return;
    case RedirectionStatus.ShouldRedirect:
    Response.Redirect(redirectUrl.AbsoluteUri, endResponse: true);
    break;
    case RedirectionStatus.CanNotRedirect:
    Response.Write("An error occurred while processing your request.");
    Response.End();
    break;
    protected void Page_Load(object sender, EventArgs e)
    // The following code gets the client context and Title property by using TokenHelper.
    // To access other properties, the app may need to request permissions on the host web.
    var spContext = SharePointContextProvider.Current.GetSharePointContext(Context);
    using (var clientContext = spContext.CreateUserClientContextForSPHost())
    //clientContext.Load(clientContext.Web, web => web.Title);
    //clientContext.ExecuteQuery();
    //Response.Write(clientContext.Web.Title);
    SP.ClientContext cc = new SP.ClientContext("http://server/sites/devapps");
    SP.Web web = cc.Web;
    SP.List list = web.Lists.GetByTitle("General Tasks");
    SP.CamlQuery caml = new SP.CamlQuery();
    Microsoft.SharePoint.Client.ListItemCollection items = list.GetItems(caml);
    cc.Load<Microsoft.SharePoint.Client.List>(list);
    cc.Load<Microsoft.SharePoint.Client.ListItemCollection>(items);
    //try
    //const int ColWidth = 40;
    cc.ExecuteQuery();
    DataTable dt = new DataTable();
    dt.Columns.Add("Task Name", typeof(string));
    dt.Columns.Add("ID", typeof(int));
    foreach (Microsoft.SharePoint.Client.ListItem liTask in items)
    DataRow dr = dt.NewRow();
    dr["Task Name"] = liTask["Title"];
    dr["ID"] = liTask["ID"];
    //dr["chkTask"] = liTask["Checkmark"];
    dt.Rows.Add(dr);
    GridView1.DataSource = dt;
    GridView1.DataBind();
    protected void chkTask_CheckedChanged(object sender, EventArgs e)
    //add code here to update Task Item by ID
    Response.Write("checkbox event triggered");
    Here is my simple default.aspx:
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="SPAppBasicWeb.Default" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title></title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <asp:GridView ID="GridView1" runat="server">
    <Columns>
    <asp:TemplateField>
    <ItemTemplate>
    <asp:CheckBox ID="chkTask" runat="server" OnCheckedChanged="chkTask_CheckedChanged" AutoPostBack="true" />
    </ItemTemplate>
    </asp:TemplateField>
    </Columns>
    </asp:GridView>
    </div>
    </form>
    </body>
    </html>
    http://www.net4geeks.com Who said I was a geek?

    Hi,
    Please try to modify your code as below:
    using (var clientContext = spContext.CreateUserClientContextForSPHost())
    SP.Web web = clientContext.Web;
    SP.List list = web.Lists.GetByTitle("General Tasks");
    SP.CamlQuery caml = new SP.CamlQuery();
    Microsoft.SharePoint.Client.ListItemCollection items = list.GetItems(caml);
    clientContext.Load(items);
    clientContext.ExecuteQuery();
    If the code still not works, I suggest you debug the code or following the blog below to create a Provider-Hosted App for SharePoint and read list items from SharePoint list.
    http://blogs.msdn.com/b/steve_fox/archive/2013/02/22/building-your-first-provider-hosted-app-for-sharepoint-part-2.aspx
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Create Pie Chart and Vertical bar chart using report builder 3.0 with sharepoint custom list

    Hi All,
    I have a client requirement to create reports which should show the graphical representation of SharePoint Custom List data. The reports are Month wise and YTD. Also i have to create dashboard.
    For creating reports, i have heard about Report Builder and SSRS. I have SQL server 2008r2 and installed report builder 3.0 but i am not aware of creating reports(KPI, Pie Chart, Vertical bar, etc.,) with sharepoint customlist.
    Can some one please help me on this.
    MercuryMan

    Here is some information about using the SharePoint List Data source with SSRS/Report Builder/BIDS:
    http://www.infotoad.com/blog/post/2012/10/11/using-a-sharepoint-list-connection-type-as-a-data-source-for-reporting-services.aspx
    http://technet.microsoft.com/en-us/library/ee633650.aspx
    http://www.codeproject.com/Articles/24469/SQL-Reporting-Services-data-from-SharePoint-lists
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Multiple list data in SSRS reports.

    Dear All,
    I have develop simple SSRS report using SharePoint 2010 list.
    While creating SSRS report it's not allowing to select multiple list.
    How we can take multiple list data in SSRS report just like JOIN query?
    Thanks,
    Harish Patil

    Hi Harish Patil ,
    By default, a data region (table) may only reference one dataset,
    not two, making the combination of two datasets into a single table not possible in SQL Server 2008 R2. But, in production, sites using: dataviews, reports based on SharePoint List connection type, reports based
    on SQL Views of the SharePoint database and sites using bespoke/third-party charting web parts, all of these Report Mechanism are available for displaying the multiple list data.
    For more detail information, you can refer to the blogs:
    Reporting From SharePoint Lists and
    Step by Step: Consuming SharePoint 2010 Lists Data in the SSRS 2008 R2 Reports.
    And, SharePoint List Association Manager (SLAM)
    allows us to define relationships (one to one, one to many, many to many) between SharePoint lists (or Content Types) and then leverage those relationships in web parts or custom field types using familiar and straight forward SQL queries.
    Also,Enesys
    RS Data Extension is a Microsoft SQL Server Reporting Service Extension that lets us build reports from SharePoint lists data.
    Hope this helps!
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Read selected values from a multi choice field programatically using Microsoft.SharePoint.Client namespace.

    All examples I found refer to classes under Microsoft.SharePoint namespace. However, I have the SharePoint CSOM that only gives me the Microsoft.Sharepoint.Client namespace.
    I need to read the selected values of a multichoice field, but not sure how to do it with classes in the namespace above.
    everthing works, exept the TSQL_x0020_Reference_x0020_Numbe field.
    my code looks like this:
    Webweb = cont.Web;
                cont.Load(web);
                cont.ExecuteQuery();
    Listsstest = web.Lists.GetByTitle("T-SQL
    Code Review Tracking");
    //CamlQuery query = CamlQuery.CreateAllItemsQuery();
    CamlQueryquery =
    newCamlQuery();
                query.ViewXml =
    @"<View>
                               <ViewFields>
                                    <FieldRef Name='Category'/>
                                    <FieldRef Name='Review_x0020_Type'/>
                                    <FieldRef Name='Review_x0020_Start_x0020_Date'/>
                                    <FieldRef Name='Title'/>
                                    <FieldRef Name='Location'/>
                                    <FieldRef Name='Project'/>
                                    <FieldRef Name='Author0'/>
                                    <FieldRef Name='AssignedTo'/>
                                    <FieldRef Name='TSQL_x0020_Reference_x0020_Numbe'/>
                                </ViewFields>
                             </View>"
     ListItemCollectionitems
    = sstest.GetItems(query);
                cont.Load(items);
                cont.ExecuteQuery();
    foreach(ListItemitem
    initems)
                    Output0Buffer.AddRow();
                    Output0Buffer.ReviewStatus = item.FieldValues[
    "Category"] !=
    null? item.FieldValues["Category"].ToString()
    : String.Empty;
                    Output0Buffer.ReviewType = item.FieldValues[
    "Review_x0020_Type"] !=
    null? item.FieldValues["Review_x0020_Type"].ToString()
    : String.Empty;
                    Output0Buffer.ReviewDate =
    DateTime.Parse(item.FieldValues["Review_x0020_Start_x0020_Date"].ToString());
                    Output0Buffer.Module = item.FieldValues[
    "Title"] !=
    null? item.FieldValues["Title"].ToString()
    : String.Empty;
                    Output0Buffer.BranchLocationURL = item.FieldValues[
    "Location"] !=
    null? item.FieldValues["Location"].ToString()
    : String.Empty;
                    Output0Buffer.ProjectName = item.FieldValues[
    "Project"] !=
    null? item.FieldValues["Project"].ToString()
    : String.Empty;
                    Output0Buffer.Author = item.FieldValues[
    "Author0"] !=
    null? item.FieldValues["Author0"].ToString()
    : String.Empty;
    FieldLookupValueflvAssignedTo =
    newFieldUserValue();
                    flvAssignedTo = item.FieldValues[
    "AssignedTo"]
    asFieldLookupValue;
    if(flvAssignedTo !=
    null)
                        Output0Buffer.AssignedTo = flvAssignedTo.LookupValue;
    varv = item.FieldValues["TSQL_x0020_Reference_x0020_Numbe"];
    if(v !=
    null)
                        Output0Buffer.Reason2 = v.ToString();
                 Output0Buffer.SetEndOfRowset();           

    Hi,
    According to your description, my understanding is that you want to read the selected choice field value using Client Object Model.
    In my environment, I create a list with a mutichoice fileld named "choice" and then I used the code snippet below to get the selected value in choice field.
    ClientContext clientContext = new ClientContext("http://sp2013sps/sites/test1");
    Microsoft.SharePoint.Client.List spList = clientContext.Web.Lists.GetByTitle("list1");
    clientContext.Load(spList);
    clientContext.ExecuteQuery();
    if (spList != null && spList.ItemCount > 0)
    Microsoft.SharePoint.Client.CamlQuery camlQuery = new CamlQuery();
    camlQuery.ViewXml =
    @"<View>
    <ViewFields><FieldRef Name='choice' /></ViewFields>
    </View>";
    ListItemCollection listItems = spList.GetItems(camlQuery);
    clientContext.Load(listItems);
    clientContext.ExecuteQuery();
    string value = listItems[0]["choice"].ToString();
    Console.WriteLine(value);
    Console.ReadKey();
    Thanks
    Best Regards
    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]

  • Error running reports Parameter validation failed

    Hi All
    I have a user who gets an error when running reports from a remote console. If I log on with my account on his console I am able to run the report..
    I have checked a few things and now open to some suggestions.. please
    SMSAdminUI.log
       at System.Management.ManagementObject.Initialize(Boolean getObject)
       at System.Management.ManagementBaseObject.get_wbemObject()
       at System.Management.PropertyData.RefreshPropertyInfo()
       at System.Management.PropertyDataCollection.get_Item(String propertyName)
       at System.Management.ManagementBaseObject.GetPropertyValue(String propertyName)
       at System.Management.ManagementBaseObject.get_Item(String propertyName)
       at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlConnectionManager.GetInstance(String objectPath)\r\nManagementException details:
    instance of SMS_ExtendedStatus
     Description = "Error retrieving object ResourceID=83886343";
     ErrorCode = 2151811598;
     File = "e:\\nts_sccm_release\\sms\\siteserver\\sdk_provider\\smsprov\\SspInterface.h";
     Line = 1198;
     Operation = "GetObject";
     ParameterInfo = "SMS_MachineSettings.ResourceID=\"83886343\"";
     ProviderName = "ExtnProv";
     StatusCode = 2147749890;
    \r\n
    [17, PID:8664][10/23/2014 08:27:20] :System.Management.ManagementException\r\nInvalid class \r\n   at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
       at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()
       at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlQueryResultsObject.<GetEnumerator>d__0.MoveNext()\r\nManagementException details:
    instance of __ExtendedStatus
     Operation = "ExecQuery";
     ParameterInfo = "SELECT * FROM SMS_Identification";
     ProviderName = "WinMgmt";
    \r\n
    [23, PID:8664][10/23/2014 08:27:59]  Parameter validation failed. It is not possible to provide valid values for all parameters. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Parameter validation failed. It is not possible
    to provide valid values for all parameters.

    ReportServerService.log
    (/ConfigMgr_J01/Site - Discovery and Inventory Information/Computers with duplicate MAC addresses).
    library!ReportServer_0-20!358!10/24/2014-10:18:47:: i INFO: Call to GetPropertiesAction(/ConfigMgr_J01/Site - Discovery and Inventory Information, PathBased).
    library!ReportServer_0-20!358!10/24/2014-10:18:47:: i INFO: Call to GetReportParametersAction(/ConfigMgr_J01/Site - Discovery and Inventory Information/Computers with duplicate MAC addresses).
    processing!ReportServer_0-20!358!10/24/2014-10:18:47:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: , Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Parameter validation failed. It is not
    possible to provide valid values for all parameters.;
    library!ReportServer_0-20!358!10/24/2014-10:18:50:: i INFO: Call to GetItemTypeAction(/).
    library!ReportServer_0-20!358!10/24/2014-10:18:50:: i INFO: Call to GetItemTypeAction(/).
    library!ReportServer_0-20!358!10/24/2014-10:18:50:: i INFO: Call to GetDataSourceContentsAction(/ConfigMgr_J01/{5C6358F2-4BB6-4a1b-A16E-8D96795D8602}).
    library!ReportServer_0-20!358!10/24/2014-10:18:50:: i INFO: Call to GetPropertiesAction(/ConfigMgr_J01, PathBased).
    library!ReportServer_0-20!358!10/24/2014-10:18:50:: i INFO: Call to GetItemTypeAction(/).
    library!ReportServer_0-20!358!10/24/2014-10:18:50:: i INFO: Call to GetDataSourceContentsAction(/ConfigMgr_J01/{5C6358F2-4BB6-4a1b-A16E-8D96795D8602}).
    library!ReportServer_0-20!358!10/24/2014-10:18:50:: i INFO: Call to CreateDataSourceAction({5C6358F2-4BB6-4a1b-A16E-8D96795D8602}, /ConfigMgr_J01, True).
    library!ReportServer_0-20!358!10/24/2014-10:18:50:: i INFO: Call to ListTasksAction(Catalog).
    library!ReportServer_0-20!358!10/24/2014-10:18:50:: i INFO: Call to SetPropertiesAction(/ConfigMgr_J01).
    processing!ReportServer_0-20!358!10/24/2014-10:19:07:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: , Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Parameter validation failed. It is not
    possible to provide valid values for all parameters.;

  • Parameter validation failed. It is not possible to provide valid values for all parameters

    I'm trying to test passing in parameter values from the URL.    I have RS 2008 .   I created an ultrasimple report based on a stored procedure output.  There is no validation, No available values, No default values.  
    I'm trying to run the report like this:
    /Reports/Pages/Report.aspx?ItemPath=%2fProduction%2fDBA+Reports%2fTest&iTest=1
    I get:
    Parameter validation failed. It is not possible to provide valid values for all parameters. (rsParameterError)
    the one int parameter is iTestId 
    The RS log file says the following:
    processing!ReportServer_0-54!9138!01/25/2013-09:22:51:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Parameter validation failed. It is not possible to provide valid values for all parameters., ;
      Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Parameter validation failed. It is not possible to provide valid values for all parameters.
    What am I missing?

    Hi F-ram,
    From your description, you want to pass multiple parameters via URL, right? To pass multiple parameters through URL, we can use an ampersand (&) to separate them. For example, I have a report with two parameters p1 and p2. The report is deployed in a
    folder on the Report Server. When I navigate to the report on the Report Server, I can see the report URL is http://localhost/ReportServer_SQL2008NEW/Pages/ReportViewer.aspx?%2fFolder%2fReport&rs:Command=Render.
    If I need to pass parameters through URL, I can just add &p1=value1&p2=value2 at the end of the URL and the entire URL would be http://localhost/ReportServer_SQL2008NEW/Pages/ReportViewer.aspx?%2fFolder%2fReport&rs:Command=Render&p1=value1&p2=value2
    If you have any questions, please feel free to ask.
    Regards,
    Charlie Liao
    Charlie Liao
    TechNet Community Support

Maybe you are looking for

  • No /dev/sda1 for flash drive w/custom kernel [solved]

    I think I may have made an error selecting the right drivers for my kernel or something. When I put my flash drive in with the official arch kernel, /dev/sda1 is created. However, when I put my flash drive in with my custom kernel, it does not. The w

  • 24" iMac Early 09 kernel panic

    I have been having regular kernal panics and frezes over the last few months any help would be apreicated Interval Since Last Panic Report:  690747 sec Panics Since Last Report:          12 Anonymous UUID:                    F314509E-09F8-4F35-9F0A-4

  • I want to use camera raw to make color adjustments after using Ps5 levels.

    Pc win 7 cs5. I like the control I get using the Hue/sat controls in Camera raw. However, I like to set Levels in Ps first. No matter what format I use to save the image after Ps adjustments, I am no longer able to open the image in camera raw. I've

  • Store files in the material master

    is it possible to store files (pictures) in the material master.. and then use this picture in a materials report?

  • No bootable device - insert boot disk and press any key to continue

    I accidentally turned off my mac book pro by keeping my finger on the Power button too long.  When I tried to turn it on again, the computer didn't boot.  Instead, I got the "No bootable device..." message.  I was not trying to install anything.  A m