How to filter data from dropdown list in sharepoint 2010

hi,
we have one requirement for filtering data from drop down list , we have 4 drop down  lists, in that  drop drown, we  can select any drop down that related data bind to grid view ,  

Try using "relationshipWebURL"
property
Ref:
http://spservices.codeplex.com/discussions/348401
Another option is by using Infopath forms
Ref:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/9a84eae9-515f-4bef-921f-5ede5819f8df/filtering-a-cascade-dropdown-list-to-use-in-another-site
Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer :)

Similar Messages

  • 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

  • Phpmysql server behaviour (How to get date from dropdown list day & month)

    Hi,
    Appreciate if someone can help me on this. I already create form and in my form there is date selector to select day,month and year. But how to use insert record funtion to get the date as below.
    thanks.
    <form id="form1" name="form1" method="post" action="">
      <table width="60%" border="0" align="center" cellpadding="3" cellspacing="3">
        <tr>
          <td width="85">Date</td>
          <td width="4">:</td>
          <td width="381"><input name="name" type="hidden" id="name" value="<?php echo $user ?>" />
            <input name="department" type="hidden" id="department" value="<?php echo $department ?>" />
            <select name="day" id="day" >
              <option value='01'>01</option>
              <option value='02'>02</option>
              <option value='03'>03</option>
              <option value='04'>04</option>
              <option value='05'>05</option>
              <option value='06'>06</option>
              <option value='07'>07</option>
              <option value='08'>08</option>
              <option value='09'>09</option>
              <option value='10'>10</option>
              <option value='11'>11</option>
              <option value='12'>12</option>
              <option value='13'>13</option>
              <option value='14'>14</option>
              <option value='15'>15</option>
              <option value='16'>16</option>
              <option value='17'>17</option>
              <option value='18'>18</option>
              <option value='19'>19</option>
              <option value='20'>20</option>
              <option value='21'>21</option>
              <option value='22'>22</option>
              <option value='23'>23</option>
              <option value='24'>24</option>
              <option value='25'>25</option>
              <option value='26'>26</option>
              <option value='27'>27</option>
              <option value='28'>28</option>
              <option value='29'>29</option>
              <option value='30'>30</option>
              <option value='31'>31</option>
            </select>
            <select name="month" value=''>
    Select Month           
              <option value='01'>January</option>
              <option value='02'>February</option>
              <option value='03'>March</option>
              <option value='04'>April</option>
              <option value='05'>May</option>
              <option value='06'>June</option>
              <option value='07'>July</option>
              <option value='08'>August</option>
              <option value='09'>September</option>
              <option value='10'>October</option>
              <option value='11'>November</option>
              <option value='12'>December</option>
            </select>
            <input type="text" name="year" size="4" value="2011" />
            <label for="date"></label>
            <input type="hidden" name="date" id="date" /></td>
        </tr>
        <tr>
          <td>Start Time</td>
          <td>:</td>
          <td><select name="start_time" id="start_time" >
            <option value="8:45">8:45 AM</option>
            <option value="9:00">9:00 AM</option>
            <option value="9:30">9:30 AM</option>
            <option value="10:00">10:00 AM</option>
            <option value="10:30">10:30 AM</option>
            <option value="11:00">11:00 AM</option>
            <option value="11:30">11:30 AM</option>
            <option value="12:00">12:00 PM</option>
            <option value="12:30">12:30 PM</option>
            <option value="13:00">1:00 PM</option>
            <option value="13:30">1:30 PM</option>
            <option value="14:00">2:00 PM</option>
            <option value="14:30">2:30 PM</option>
            <option value="15:00">3:00 PM</option>
            <option value="15:30">3:30 PM</option>
            <option value="16:00">4:00 PM</option>
            <option value="16:30">4:30 PM</option>
            <option value="17:00">5:00 PM</option>
            <option value="17:45">5:45 PM</option>
          </select></td>
        </tr>
        <tr>
          <td colspan="3" align="center"><input type="submit" name="button" id="button" value="Submit" /></td>
        </tr>
      </table>
    </form>

    kelah_merah wrote:
    ... but I have problem on edit the records. How to get the dropdownlist display the current day,month and year
    I *knew* you´re going to ask this question
    The attached screenshot "screen_update_query" shows how to...
    a) utilize some of MySQL´s Date and Time Functions to extract the day, month and year from a datetime column (here named "col_datetime")
    b) extract the hh:mm via a DATE_FORMAT pattern
    All four information units would be pretty much useless without defining a Column Alias (e.g. AS day)
    The second screenshots shows how to tie the values of one of your dynamic lists (e.g. the list of days) to the respective Column Alias by using the "select value equal to" feature.
    That´s it !

  • HOW TO FILTER DATA FROM MICROSOFT ACCESS

    HOW TO FILTER DATA FROM MICROSOFT ACCESS BASED ON DATE AND TIME AND GIVE THE RESULT TO A TABLE ?
    I need some example files , can anybody please help me ?
    Solved!
    Go to Solution.

    Just be sure to get examples specific to the Jet DBMS. It is rather "idiosyncratic" when dealing with time and date values.
    One question: the timestamp is being saved in a datetime field, right?
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Reading and writing data to a list in Sharepoint 2010.

    I'm having difficulty writing data to a list in sharepoint 2010, the reading the information is going fine, but I just tried writing data, and it's not working well.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using ListQuery.StudentsList;
    using System.Xml.Linq;
    using System.Net;
    namespace ListQuery
    class Program
    static void Main(string[] args)
    XNamespace ns = "#RowsetSchema";
    ListsSoapClient soap = new ListsSoapClient();
    XElement query = new XElement("Query");
    XElement options = new XElement("QueryOptions");
    XElement view = new XElement("ViewFields");
    soap.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
    XElement list = soap.GetListItems("Students", null, query, view, "900001", options, null);
    foreach (XElement descendent in list.Descendants())
    descendent.SetAttributeValue("ows_fullName", "I am sparticus");
    soap.UpdateListItems("Students", list); // ERROR LINE
    var asdf = from x in list.Descendants()
    where x.Name == ns + "row"
    select x.Attribute("ows_fullName").Value;
    foreach (string blah in asdf)
    Console.WriteLine(blah);
    Console.WriteLine("\n\t--Process Completed--");
    Console.ReadKey(true);
    I wrote a comment showing the line where the code had a break in execution. The error I'm receiving is this,
    "Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown."
    Any help is appreciated, thanks!

    Puil, I decided to go with your idea, but when trying to connect to the data source at listdata.svc using the add data connection wizard, at the very end upon clicking finish I get an error "System.Exception", this is what shows up in my error list.
    Error 1 Custom tool error: Schema specified is not valid. Errors:
    (0,0) : error 0005: The 'Name' attribute is invalid - The value '__10Item' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Relationship' attribute is invalid - The value 'Microsoft.SharePoint.DataService.__10Item_CreatedBy' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TQualifiedName' - The Pattern constraint failed.
    (0,0) : error 0005: The 'FromRole' attribute is invalid - The value '__10Item' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Relationship' attribute is invalid - The value 'Microsoft.SharePoint.DataService.__10Item_ModifiedBy' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TQualifiedName' - The Pattern constraint failed.
    (0,0) : error 0005: The 'FromRole' attribute is invalid - The value '__10Item' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Relationship' attribute is invalid - The value 'Microsoft.SharePoint.DataService.__10Item_CheckedOutTo' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TQualifiedName' - The Pattern constraint failed.
    (0,0) : error 0005: The 'FromRole' attribute is invalid - The value '__10Item' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Name' attribute is invalid - The value '__10Item_CreatedBy' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Role' attribute is invalid - The value '__10Item' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Type' attribute is invalid - The value 'Microsoft.SharePoint.DataService.__10Item' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TQualifiedName' - The Pattern constraint failed.
    (0,0) : error 0019: Each type name in a schema must be unique. Type name 'Microsoft.SharePoint.DataService.' was already defined.
    (0,0) : error 0005: The 'Name' attribute is invalid - The value '__10Item_ModifiedBy' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Role' attribute is invalid - The value '__10Item' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Type' attribute is invalid - The value 'Microsoft.SharePoint.DataService.__10Item' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TQualifiedName' - The Pattern constraint failed.
    (0,0) : error 0019: Each type name in a schema must be unique. Type name 'Microsoft.SharePoint.DataService.' was already defined.
    (0,0) : error 0005: The 'Name' attribute is invalid - The value '__10Item_CheckedOutTo' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Role' attribute is invalid - The value '__10Item' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Type' attribute is invalid - The value 'Microsoft.SharePoint.DataService.__10Item' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TQualifiedName' - The Pattern constraint failed.
    (0,0) : error 0019: Each type name in a schema must be unique. Type name 'Microsoft.SharePoint.DataService.' was already defined.
    (0,0) : error 0005: The 'Name' attribute is invalid - The value '_10' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'EntityType' attribute is invalid - The value 'Microsoft.SharePoint.DataService.__10Item' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TQualifiedName' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Name' attribute is invalid - The value '__10Item_CreatedBy' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Association' attribute is invalid - The value 'Microsoft.SharePoint.DataService.__10Item_CreatedBy' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TQualifiedName' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Role' attribute is invalid - The value '__10Item' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'EntitySet' attribute is invalid - The value '_10' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Name' attribute is invalid - The value '__10Item_ModifiedBy' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Association' attribute is invalid - The value 'Microsoft.SharePoint.DataService.__10Item_ModifiedBy' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TQualifiedName' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Role' attribute is invalid - The value '__10Item' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'EntitySet' attribute is invalid - The value '_10' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Name' attribute is invalid - The value '__10Item_CheckedOutTo' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Association' attribute is invalid - The value 'Microsoft.SharePoint.DataService.__10Item_CheckedOutTo' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TQualifiedName' - The Pattern constraint failed.
    (0,0) : error 0005: The 'Role' attribute is invalid - The value '__10Item' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed.
    (0,0) : error 0005: The 'EntitySet' attribute is invalid - The value '_10' is invalid according to its datatype 'http://schemas.microsoft.com/ado/2007/05/edm:TSimpleIdentifier' - The Pattern constraint failed. c:\users\wileym\documents\visual studio 2010\Projects\ecomms\ecomms\Service
    References\studentList\Reference.datasvcmap 1 1 ecomms
    It seems the schema is all wrong... Any help would be appreciated.

  • 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 filter data from a source XML? Please help!

    Hi Experts,
       I have a source XML as shown below:
        <Inventory>
         <InventoryItem>
           <ItemCode>InTransit</ItemCode>
           <Quantity>1000</Quantity>
         </InventoryItem>
         <InventoryItem>
           <ItemCode>Available</ItemCode>
           <Quantity>1500</Quantity>
         </InventoryItem>
         <InventoryItem>
           <ItemCode>Restricted</ItemCode>
           <Quantity>2500</Quantity>
         </InventoryItem>
        </Inventory>
    My Target XML is as below
        <Inventory>
          <stock>1500</stock>
        </Inventory>
    The stock element contains Quantity value where ItemCode is 'Available'.
    But note that there are 3 InventoryItem nodes.
    So how to get the desired target XML in XI mapping? Basically I have to filter data from source XML based on value of an element. What is the best approach to handle this?
    Kindly help
    Thanks
    Gopal

    Hi venkat,
              Your solution does'nt work fine. But why are you using collapsecontext and splitbyvalue before putting the value into stock element?
               Kindly explain your concept.
    My target message is:
    <?xml version="1.0" encoding="UTF-8"?>
    <Inventory>
       <InventoryItem>
          <ItemCode>InTransit</ItemCode>
          <Quantity>1500</Quantity>
       </InventoryItem>
       <InventoryItem>
          <ItemCode>Available</ItemCode>
          <Quantity>1000</Quantity>
       </InventoryItem>
       <InventoryItem>
          <ItemCode>UnRestricted</ItemCode>
          <Quantity>2000</Quantity>
       </InventoryItem>
       <InventoryItem>
          <ItemCode>Available</ItemCode>
          <Quantity>2500</Quantity>
       </InventoryItem>
    </Inventory>
    I am getting the output even though stock is unbounded and I have used collapsecontext and splitbyvalue as:
    <InvStock>
      <Stock>1000</Stock>
    </InvStock>
    I should get:
    <InvStock>
      <Stock>1000</Stock>
      <Stock>2500</Stock>
    </InvStock>
    Thanks
    Gopal
    Message was edited by:
            gopalkrishna baliga

  • 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

  • How to Retreive data from custom list on specify conditions?

    Hi All,
    I have custom list.And the custom list data contains 100 rows of data.
    my requirement is  how to retrieve custom list data from specific condition like 20-30,50-70.
    Assume that i want to fetch 20 record to 30th record.
    How to use the caml query for the above situation.
    Please assist me.
    Rama

    Hi 
    Thanks for posting your issue, Kindly browse the below mentioned URL to find related the CAML query example
    http://karinebosch.wordpress.com/2012/02/03/caml-and-the-client-object-model/
    I hope this is helpful to you, mark it as Helpful.
    If this works, Please mark it as Answered.
    Regards,
    Dharmendra Singh (MCPD-EA | MCTS)
    Blog : http://sharepoint-community.net/profile/DharmendraSingh

  • Please help !!!! How to get data into dropdown list box

    Hi all,
    I want to display data from ResultSet object to drop down
    list box in my JSP form.
    How should I proceed ?
    Please help me what should I do ?
    Thanks for any help in advance.
    savdeep.

    dear hermione
    it depends on the compexity of the application
    i could also have suggested to use a JSP custom tag
    that can populate the values stored in a table. I
    guess u must have used that approach too.
    But why to make the things complicated when they can
    be done in an easier manner.
    The author seems to be a beginner and telling him to
    call Helper classes just to make a drop down is not
    at all feasible.
    what do u say?I believe it is best to start with a proper approach than finding quick solutions. Of course, JSTL sql tags allow you to execute queries within the JSP but they look cleaner in code.
    Certainly, if the OP is a beginner in JSP (presuming that he has some background of core Java and OOP), I don't see any reason why there should not be a separate class with a well-defined responsibility. This will help the OP develop a thinking towards designing a good solution rather than simply patching in bits of procedural code to get the job done. There is a difference in doing something and doing in properly. :)
    I suppose I am a little wary since I have been working too long maintaining code developed by others. A simple change in the requirement needs a lot of impact on several components.

  • How to Downlaod Data from Alv List to Excel File

    Hi,
      I have a Requirement like While download data from ALV to Excel File .After Download data into Excel we will not allow user to edit the Excel data..
    Plz  help me to complete this scenario.
    Thanks & Regards,
    Kumaran Duraiswamy.

    hi,
    try these following fm's
    MS_EXCEL_OLE_STANDARD_DAT
    EXCEL_OLE_STANDARD_DAT
    CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
    EXPORTING
    file_name = 'Your Path' " enter your path to save the file.
    CREATE_PIVOT = 0
    * DATA_SHEET_NAME = ' '
    * PIVOT_SHEET_NAME = ' '
    * PASSWORD = ' '
    * PASSWORD_OPTION = 0
    VISIBLE = '0'
    No_DIALOG = 'X'
    TABLES
    * PIVOT_FIELD_TAB =
    DATA_TAB = t_deli_final
    * FIELDNAMES =
    EXCEPTIONS
    FILE_NOT_EXIST = 1
    FILENAME_EXPECTED = 2
    COMMUNICATION_ERROR = 3
    OLE_OBJECT_METHOD_ERROR = 4
    OLE_OBJECT_PROPERTY_ERROR = 5
    INVALID_FILENAME = 6
    INVALID_PIVOT_FIELDS = 7
    DOWNLOAD_PROBLEM = 8
    OTHERS = 9
    IF sy-subrc 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    2nd fm
      CALL FUNCTION 'EXCEL_OLE_STANDARD_DAT'
           EXPORTING
                FILE_NAME                 = 'Your Path' "path to save your file
                DATA_SHEET_NAME           = V_SHEET_NAME
           TABLES
                DATA_TAB                  = TLX
           EXCEPTIONS
                FILE_NOT_EXIST            = 1
                FILENAME_EXPECTED         = 2
                COMMUNICATION_ERROR       = 3
                OLE_OBJECT_METHOD_ERROR   = 4
                OLE_OBJECT_PROPERTY_ERROR = 5
                INVALID_FILENAME          = 6
                INVALID_PIVOT_FIELDS      = 7
                DOWNLOAD_PROBLEM          = 8
                OTHERS                    = 9.
      IF SY-SUBRC NE 0.
        WRITE:/ 'ERROR OPENING EXCEL'.
      ENDIF.
    ELSE.
      WRITE:/ 'ERROR OR NO DATA'.
    ENDIF.

  • I need help figuring out how to Link Data from one table in Sharepoint to another table in Sharepoint and make it dynamic

    Hi Everyone,
    I am working on a project that uses SharePoint 2010 for repository and we have multiple tables that we are using.
    One table is a list of the various projects we are working on (workstreams)
    The other is a table with various notes and such, to include meeting notes for the various projects.
    Currently we are just copying the shortcut from the meeting notes table and adding it in as a link in the workstreams status table.
    I need to find out if there is some sort of way to make this process dynamic so that when a new note is added for, lets say workstream #1 in the notes table, it will automatically propogate into the notes link section for workstream #1.
    Is this even possible??
    And if so how would I do it
    I haven't done much with modifying SharePoint in several years, and would Truly appreciate any and all help with this.
    Thanks in advance
    IKE

    Hi IKE,
    According to your description, my understanding is that you want to create a link in the workstreams list linked to the associated item of the notes list.
    Assuming the workstreams list has  Title column and another column called “Note” used to linked to notes list, and the notes list has Title column and another column used to store note.
    Then you can create a workflow on the notes list with SharePoint Designer 2010, and in the workflow, using “Update ListItem” action. And in the workflow Start Options, select “Start workflow automatically when an item is created”.
    For the workflow action, you can set as the screenshot:
    For the string in the String Builder, you need to open an item of notes list, then copy the URL of the display form and paste here, the URL will look something like this:
    http://sp/Lists/notes/DispForm.aspx?ID=1&Source=http%3A%2F%2Fsp%2FLists%2Fnotes%2FAllItems%2Easpx&ContentTypeId=0x0100300025278693CE49A5E3A394B23AD9E1&IsDlg=1
    Now, you need to replace the ID of the item using [%Current Item:ID%], for example in the above link, delete the number 1 and add [%Current Item:ID%].
    Best Regards,
    Wendy
    Wendy Li
    TechNet Community Support

  • How to create a custom Contacts list in SharePoint 2010 from accounts already in AD

    Hi folks,
    Newbie to SharePoint but not to being an Administrator.  Problem is that in my new functions I no longer am an Admin.
    I have been asked to post contact lists (Excel) on the SharePoint site.  (fairly easy to do)
    But I though....we already have these people in AD and the GAL
    Why can't I just import what I want only and display that in SharePoint.
    I assume this is possible?
    I do not have SharePoint designer nor any programming experience....so no coding for me.
    Running SharePoint 2010 and Outlook 2010
    Can anyone guide me or give me info on how to do this?
    I do not want everyone in the AD/GAL.  Just some specific names with their contact info

    Hi,
    Please check this
    http://beyondweblogs.com/update-user-profile-in-sharepoint-programmatically/

  • How to filter data from two diff. table ???

    i am developing a web application with crystal reports .
    I am using crystal report api in eclipse.
    now my problem ....
    there are three tables person , natural_dead, violent_dead
    I just want to show the total no of count of person dead naturally as well as violently ., count must come from person table (as there is a flag which is set when person is dead)
    so how could i do that ??
    If you need more information , then pls let me know .
    Thanks and regards

    thanks for your reply,
    but there is one problem , i just want to show the count of dead persons caused by nature or violent  like follow
    Persons dead naturally   20
    persons dead Violently     25
         total                               45
    for this i have to use all three tables and i did that,
    but i don't know how crystal reports applying join on them ,
    As i am using crystal report's plugin in eclipse , i am doing drag n drop of tables in data field and and as per their relationship i joined them
    for your information i don't know which version of crystal report i am using , but when i use window->preferences->crystal report->crystal report application  , it showing me available version  11.8.0
    Please let me know if you need further information
    Edited by: Pankajjain15 on Jul 6, 2009 10:18 AM

  • How to pass data from report list to program?

    Hi all,
    I have displayed an internal table content in a list with some fields setting input on.
    For example,
    LOOP AT ITAB.
       WRITE: ITAB-MATNR.
       WRITE: ITAB-MAKTX INPUT ON.
       WRITE: ITAB-LABOR INPUT ON.
    ENDLOOP
    Suppose there are 4 entries in ITAB, user then changes the MAKTX, LABOR of any 3 entries.
    Now, I want to update ALL the fields values (MAKTX, LABOR) on the list to database even though some fields values have not been changed. How could I pass ALL the fields values (MAKTX, LABOR) from the screen to the program? Should I use the read line command?
    Please help. Thanks.

    It's been a while since I tried this, but I think it goes:
    do:
      READ LINE sy-index FIELD VALUE ITAB-MATNR INTO matnr.
      if sy0subrc <> 0.
        exit.
      endif.
    enddo.
    The ABAP know that you wrote itab-matnr, and READ LINE is able to get that variable back again.
    Rob

Maybe you are looking for