How to get listitems from different lists using Js

Hi,
I want to search my web for all the lists that contains a certain checkbox column (get it by name).
Once I have this list, I want to iterate through all of them and get the list items with this column checked.
I got the lists, but when I tried to get the fields - I got an error - the system doesn't recognizes the fields.
To be more specific - in the code I've posted below in method onGetFieldsSuccess I'm getting an error in the first line, as I can't retrieve the enumerator.
In the MSDN I saw how to retrieve list's fields, but there it was a specific list. Is there a way to get the lists who have a specific field?
Any help will be appreciated
<script> 
ExecuteOrDelayUntilScriptLoaded(showFavorites, "sp.js"); 
var ctx;
var lists;
function showFavorites()
     ctx = new SP.ClientContext.get_current();
     var web = ctx.get_site().openWeb("/legal");
     ctx.load(web);
     lists = ctx.get_site().openWeb("/legal").get_lists();
     ctx.load(lists);
     ctx.executeQueryAsync(Function.createDelegate(this, this.onGetListSuccess), Function.createDelegate(this, this.onFail));
var list;
var fields;
function onGetListSuccess(sender, args) {
          var listEnumerator = lists.getEnumerator();
          while (listEnumerator.moveNext()) {
               list = listEnumerator.get_current();
               ctx.load(list);
               fields = list.get_fields();
                ctx.load(fields , 'Include(Title)');
               ctx.executeQueryAsync(Function.createDelegate(this, this.onGetFieldsSuccess), Function.createDelegate(this, this.onFail));
function onGetFieldsSuccess(sender, args)
      var fieldEnumerator = fields.getEnumerator();
    while (fieldEnumerator.moveNext()) {
        var field = fieldEnumerator.get_current();
        var name = field.get_staticName();
        if (name == "MyFavorite") {
            alert(list.get_title()); 
            break;
function onFail(sender, args) {
    console.log(args.get_message());
</script>​​​​​​​​​​​​​​​​​​​​​​​​​

Thanks a lot Thriggle,
I've used your advise, and other then some syntax problems (as you predicted :) everything worked just fine!
(I had to add another executeQueryAsync to get the listItems files - but that wasn't a problem).
The only issue that I have is that it takes FOREVER to load, and once it does load - it returns duplicates of the same results (sometimes 3, sometime up to 10).
I only have 13 tables with about 50 list items in each table, and from that only 6 tables have the specified field - so it shouldn't have taken THAT long (sometimes I see the results after 45 seconds after the page finished loading).
should I have used a new client context for each query? or is there a place where I'm getting unnecessary loops (I've made sure that I have only 1 list item that matches the 
I'm resending the complete code. maybe there's something I've missed here.
<cfheader name="X-XSS-Protection" value="0"></cfheader>​​​​​ ​​​<script>
ExecuteOrDelayUntilScriptLoaded(showFavorites, "sp.js"); 
function showFavorites()
     var displayTable = document.getElementById("myFavoritesTable");
     for(var i = displayTable.rows.length - 1; i > 0; i--)
            displayTable.deleteRow(i);
   var fieldToLookFor = "MyFavorite";
     var ctx = new SP.ClientContext.get_current();
     var web = ctx.get_site().openWeb("/legal");
     var lists = web.get_lists();
     ctx.load(web);
     ctx.load(lists, 'Include(Title,Fields)');
     ctx.executeQueryAsync(Function.createDelegate(this, function(){
     var matchingLists = [];
     var listEnum = lists.getEnumerator();
     while(listEnum.moveNext()){
          var currList = listEnum.get_current();
          var containsField = false;
          var fields = currList.get_fields();
          var fieldEnum = fields.getEnumerator();
          while(fieldEnum.moveNext()){
               if(fieldEnum.get_current().get_staticName() == fieldToLookFor){ containsField = true; break;}
          if(containsField){
              matchingLists.push(currList.get_title());            
     //alert(matchingLists);
     var i = 0;
     while(i < matchingLists.length){
          var list = lists.getByTitle(matchingLists[i]);
          i++;
          var camlQuery = new SP.CamlQuery();
          var camlString = '<View><Query><FieldRef Name=\'' + fieldToLookFor + '\' /><Value Type=\'Integer\'>1</Value></Query></View>';
          camlQuery.set_viewXml(camlString);
          var items = list.getItems(camlQuery);
          ctx.load(items);
          ctx.executeQueryAsync(Function.createDelegate(this,function(){
               var itemEnum = items.getEnumerator();
               while(itemEnum.moveNext()){
                    var item = itemEnum.get_current();
                    var file = item.get_file();
                    ctx.load(file);
                    ctx.executeQueryAsync(Function.createDelegate(this,function(){
                    var table = document.getElementById("myFavoritesTable");
// Create an empty <tr> element and add it to the 1st position of the table:
var row = table.insertRow(-1);
// Insert new cells (<td> elements) at the 1st and 2nd position of the "new" <tr> element:
var cell1 = row.insertCell(0);
var cell2 = row.insertCell(1);
var cell3 = row.insertCell(2);
var cell4 = row.insertCell(3);
cell1.innerHTML = "XX";
cell2.innerHTML = item.get_id();
cell3.innerHTML = "<a href='" + item.get_file().get_serverRelativeUrl() + "' alt=''>" + item.get_file().get_name() + "</a>" ;
cell4.innerHTML = "";
                 }),Function.createDelegate(this,function(sender, args){
              alert(args.get_message());
          }),Function.createDelegate(this,function(sender, args){
              alert(args.get_message());
}), Function.createDelegate(this, function(sender, args){ 
     alert(args.get_message()); 
</script>​​​​​ 
<table id="myFavoritesTable">
   <tbody> 
      <tr valign="top" class="ms-viewheadertr"> 
         <th nowrap="nowrap" class="ms-vh"> 
            <table> 
               <tbody> 
                  <tr> 
                     <td width="100%" nowrap="nowrap" class="ms-vb">שם טבלה 
                        <img src="/_layouts/15/images/blank.gif" height="1" width="13" alt="" style="visibility: hidden;"/> </td> 
                  </tr> 
               </tbody> 
            </table> 
         </th> 
         <th nowrap="nowrap" class="ms-vh"> 
            <table> 
               <tbody> 
                  <tr> 
                     <td width="100%" nowrap="nowrap" class="ms-vb">ID 
                        <img src="/_layouts/15/images/blank.gif" height="1" width="13" alt="" style="visibility: hidden;"/> </td> 
                  </tr> 
               </tbody> 
            </table> 
         </th> 
         <th nowrap="nowrap" class="ms-vh"> 
            <table> 
               <tbody> 
                  <tr> 
                     <td width="100%" nowrap="nowrap" class="ms-vb">כותרת 
                        <img src="/_layouts/15/images/blank.gif" height="1" width="13" alt="" style="visibility: hidden;"/> </td> 
                  </tr> 
               </tbody> 
            </table> 
         </th> 
         <th nowrap="nowrap" class="ms-vh"> 
            <table> 
               <tbody> 
                  <tr> 
                     <td width="100%" nowrap="nowrap" class="ms-vb">מסמך ​ 
                        <img src="/_layouts/15/images/blank.gif" height="1" width="13" alt="" style="visibility: hidden;"/> ​​​​​​​</td> 
                  </tr> 
               </tbody> 
            </table> 
         </th> 
      </tr>
   </tbody> 
</table>​ 
<p>​​​​​​​​​</p>

Similar Messages

  • How to get listitems from Sharepoint online using REST based on webid and listid

    In my JavaScript code I have a webid and a listid in a sharepoint form page.
    I'm trying to construct a rest url to get to the infomation in the list.
    I cant figure out the url to get at the lists items.
    My WebID is 33213c5c-30e5-468c-87f7-52b48a7b6a3d
    My ListID is d38444af-dd7f-404b-9e75-b1f8c6cdee7d
    When i go to
    https://xxx.sharepoint.com/_api/web/webs?$expand=lists,lists/items&$filter=(iD eq guid'33213c5c-30e5-468c-87f7-52b48a7b6a3d' )
    I get all items in all lists on the specified web. But when i go to
    https://xxx.sharepoint.com/_api/web/webs?$expand=lists,lists/items&$filter=((iD eq guid'33213c5c-30e5-468c-87f7-52b48a7b6a3d' ) and (Lists/Id eq guid'd38444af-dd7f-404b-9e75-b1f8c6cdee7d'
    Sharepoint complains saying  'Field or property "Id" does not exist'
    I can probably do this using multiple requests (get the web, then get the list), but the component I am working on needs a single url to access the listitems,
    Can this be done?

    Unfortunately, this cannot be done. The best you can do is to bring back the lists collection of the sub site.
    https://xxx.sharepoint.com/_api/web/webs&$filter=(id eq guid '33213c5c-30e5-468c-87f7-52b48a7b6a3d')&$select=lists&$expand=lists
    The unfortunate part here is that the webs (web collection) object does not implement an indexer. Why? Don't know. It should just like the lists (list collection).
    https://xxx.sharepoint.com/_api/web/webs(guid '33213c5c-30e5-468c-87f7-52b48a7b6a3d')/lists(guid'd38444af-dd7f-404b-9e75-b1f8c6cdee7d');
    With a web collection indexer it would be that easy.
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • How to get resultset from oracle procedure use ejb3

    how to get resultset from oracle procedure use ejb3
    i know oracle procedure should like this
    Create or replace PROCEDURE resultset_test(
    aaa IN NUMBER,
    bbb OUT sys_refcursor) ....
    but what s the ejb3 scripts looks like? please give me an example or link~
    ths

    - there are no EJB3 scripts, only compiled application code
    - the part of the EJB spec that deals with databases is called the Java Persistence API, but likely you are just looking for the JDBC API.
    Now you should know what to Google to get your "example script": "java jdbc oracle procedure"

  • 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 get Time from Different Work Station on the Network

    Hi,
    How do I get time from different work station on the network using its ip:port etc.
    Lets say, my main server-side Java application is running on a work station 123.12.123.1:1527,
    the client-side applications are accessing it using above IP.
    what I wanna do is, use the time of 123.12.123.1 machine throughout the application, not client local time.
    Appreciated..

    Ok, this network service on IP:Port is working for me, I hope this is the best way of doing it.
    In server application, I have this
    package RenameItToYourOwnPackage;
    import java.io.IOException;
    import java.io.ObjectInputStream;
    import java.io.ObjectOutputStream;
    import java.net.ServerSocket;
    import java.net.Socket;
    import java.text.SimpleDateFormat;
    public class ServerSocketExample implements Runnable {
        private ServerSocket server;
        private int port = 7777;
        Socket socket;
        public void run() {
            try {
                System.out.println("Waiting for client message");
                server = new ServerSocket(port);
                while (true) {
                    socket = server.accept();
                    // Read a message sent by client application
                    ObjectInputStream ois = new ObjectInputStream(socket.getInputStream());
                    String clientMessage = (String) ois.readObject();
                    System.out.println("Message sent by client: " + clientMessage);
                    // send current datetime to client
                    ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream());
                    oos.writeObject(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new java.util.Date()));
                    ois.close();
                    oos.close();
                    socket.close();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (ClassNotFoundException e) {
                e.printStackTrace();
    }In the client application I have
    package RenameItToYourOwnPackage;
    import java.io.IOException;
    import java.io.ObjectInputStream;
    import java.io.ObjectOutputStream;
    import java.net.InetAddress;
    import java.net.Socket;
    import java.net.UnknownHostException;
    public class ClientSocketExample {
        static String dateTimeString;
        public ClientSocketExample() {
        public static String getServerDateString() {
            try {
                // Create a connection to the server socket on the server application
                InetAddress host = InetAddress.getByName("127.0.0.1");
                Socket socket = new Socket(host.getHostName(), 7777);
                // Send a message to the server application
                 ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream());
                 oos.writeObject("Send me today's timestamp as string");
                // Read the response by server application
                ObjectInputStream ois = new ObjectInputStream(socket.getInputStream());
                dateTimeString = (String) ois.readObject();
                //System.out.println("Message sent by server: " + message);
                ois.close();
                oos.close();
            } catch (UnknownHostException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (ClassNotFoundException e) {
                e.printStackTrace();
            return dateTimeString;
    }And I run the service on the server-side with
            new Thread(new ServerSocketExample()).start();On the client-side I receive the date with
            System.out.println("DateTime on Server : " + ClientSocketExample.getServerDateString());Edited by: nkamir on Sep 13, 2010 2:53 PM

  • How to get items from a list that has more items than the List View Threshold?

    I'm using SharePoints object model and I'm trying to get all or a subset of the items from a SharePoint 2010 list which has many more items than the list view threshold (20,000+) using the SPList.GetItems() method. However no matter what I do the SPQueryThrottledException
    always seems to be thrown and I get no items back.
    I'm sorting based on the ID field, so it is indexed. I've tried setting the RowLimit property on the SPQuery object(had no effect). I tried specifying the RowLimit in the SPQuerys ViewXml property, but that still throws a throttle exception. I tried using the
    ContentIterator as defined here:http://msdn.microsoft.com/en-us/library/microsoft.office.server.utilities.contentiterator.aspx,
    but that still throws the query throttle exception. I tried specifying the RowLimit parameter in the ProcessListItems functions, as suggested by the first comment here:http://tomvangaever.be/blogv2/2011/05/contentiterator-very-large-lists/,
    but it still throws the query throttle exception. I tried using GetDataTable instead, still throws query throttle exception. I can't run this as admin, I can't raise the threshold limit, I can't raise the threshold limit temporarily, I can't override the lists
    throttling(i.e. list.EnableThrottling = false;), and I can't override the SPQuery(query.QueryThrottleMode = SPQueryThrottleOption.Override;). Does anyone know how to get items back in this situation or has anyone succesfully beaten the query throttle exception?
    Thanks.
    My Query:
    <OrderBy>
        <FieldRef Name='ID' Ascending='TRUE' />
    </OrderBy>
    <Where>
        <Geq><FieldRef Name='ID' /><Value Type='Counter'>0</Value></Geq>
    </Where>
    My ViewXml:
    <View>
        <Query>
            <OrderBy><FieldRef Name='ID' Ascending='TRUE' /></OrderBy>
            <Where>
                <Geq><FieldRef Name='ID' /><Value Type='Counter'>0</Value></Geq>
            </Where>
        </Query>
        <RowLimit>2000</RowLimit>
    </View>
    Thanks again.

    I was using code below to work with 700000+ items in the list.
    SPWeb oWebsite = SPContext.Current.Web;
    SPList oList = oWebsite.Lists["MyList"];
    SPQuery oQuery = new SPQuery();
    oQuery.RowLimit = 2000;
    int intIndex = 1;
    do
    SPListItemCollection collListItems = oList.GetItems(oQuery);
    foreach (SPListItem oListItem in collListItems)
    //do something oListItem["Title"].ToString()
    oQuery.ListItemCollectionPosition = collListItems.ListItemCollectionPosition;
    intIndex++;
    } while (oQuery.ListItemCollectionPosition != null);
    Oleg
    Hi Oleg, thanks for replying.
    The problem with the code you have is that your SPQuery object's QueryThrottleMode is set to default. If you run that code as a local admin no throttle limits will be applied, but if you're not admin you will still have the normal throttle limits. In my
    situation it won't be run as a local admin so the code you provided won't work. You can simulate my dilemma by setting the QuerryThrottleMode  property to SPQueryThrottleOption.Strict, and I'm sure you'll start to get SPQueryThrottledException's
    as well on that list of 700000+ items.
    Thanks anyway though

  • How to get username from AssignedTo item using Powershell with CSOM?

    Hi all:
    I have a Powershel script with CSOM to extract some information from a list in SP2010, however I can’t get the user name associated to the field ‘AssignedTo’. It seems that in order to extract information from this field you need to use ‘Microsoft.SharePoint.Client.FieldLookupValue’
    however I don’t know how to do that with Powershell.
    Thank you very much for your help
    Regards

    Hi Jaydeep:
    The sentence "New-Object Microsoft.SharePoint.SPFieldUserValue" failed, however, I just added this to get the User Name:
    $item["AssignedTo"].lookupvalue
    I don't know if it is the best solution but it shows the UserName.
    Thank you very much
    Regards
    Carlos Negroni

  • 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 get administrations of distribution list using api?

    I want get all administrations of a distribution list using api, how to do that?
    anybody knows? Thank you very much!!

    there is a standard function in mdm wd component
    https://help.sap.com/saphelp_nwmdm71/helpdata/en/loio30bf76947bb64c48a2e835fda42c5183_30bf76947bb64c48a2e835fda42c5183/4…
    "Note The Compare to Original button on the Items Detail component opens a Compare component enabling a user to compare a checked out record with an original record (if the user has authorization for the checked out group).
    If the checked out record is a result of a merge action, then the Compare view displays all the original records prior to the merge. When a merge action is executed on a number of checked out records, the merged record is also checked out."

  • How to get file from FTP Server using File Control

    Hi,
    Any one did getting file from FTP Server?
    Please let me know any one help me.
    I would need to get file from FTP Server.
    Thanks,
    Madhu

    Yes I have done that. But In FTP Server I cannt read file, because no previliges. Only I need to copy file from FTP Server to local server then only I can read that file.
    I tried all options using FileConrol(getFiles(),read()).
    getFiles() - It wont copy the file, it give information about file.
    read() - I dont have previliges to read the file.
    Please tell me any other procedure would be there for getting file from FTPServer.
    Thanks,
    Madhu

  • How to get data from live site using C# on grid view

    hi, how am I able to get data from a website and display it in a grid view ?
    Can anyone show me how I would do this? Thanks

    Hello,
    This post does not fit to this forum, read the
    stickies.
    Regards, Eyal Shilony

  • How to get data from  different SEGMENTs

    Hi;
    My requirement is to first of all retrieve the data from different segments in run time.
    I mean, i have to execute t/code WE19 and the idoc will be given after that an user exit would called where i have to retrieve the data from different segments and then it would store in an internal table for further calculation.
    Can you all please guide me how to retrieve the data via ABAP code in runtime so that it can store in an internal table.
    Regards
    Shashi

    write code lke this ..
    form post_idoc tables idoc_data structure edidd
                                    idoc_status structure bdidocstat .
    loop at idoc_data .
      case idoc_data-segnam .
        when 'zsegment1'.
           move idoc_data-sdata to wa_zsegment1 .
        when 'zsegment2'.
          move idoc_data-sdata to wa_zsegment2 .
       when 'zsegmentn'.
          move idoc_data-sdata to wa_zsegmentn.
      endcase .
    endloop.
    After this write code to move data to int table from work area .
    endform .
    Hope this helps u....

  • How to Select Data from different Tables Using Linq

    Hi,
    I have two different tables, I just want to collect data from tables using Linq to SQL Queries.
    The tables looks like This 
    ID Name ImageUrl 
    Other Table is
    ID EmpID CheckInTime CheckOutTime 
    What I want to Collect data from CheckInTime and want to place it in a that is in a list view
    Same thing I want to do it for CheckOutTime And One thing I want to tell is both tables are joined by a FK EmpID with ID.
    What Are the suggestions for me 
    I have Used this code
    var data = from emp in db.Employees
    join chk in db.CheckInCheckOuts on emp.ID equals chk.EmpID
    select new EmployeeCheckInOut
    Name = emp.Name,
    ImageUrl = emp.ImageUrl,
    CheckIn = emp.CheckInCheckOuts,
    CheckOut = emp.CheckInCheckOuts
    Here the CheckInCheckOuts is another table, I don't how do I access fields of the Other table "CheckInCheckOuts"
    Thank you
    Ali

    Mitja,
    Kind of Tables, I don't Know but I can Tell you that these are Two table, first Table Have Data in It, Name, ImageUrl I have filled this table with names and ImageUrls And are string type.Other Table is for the CheckInTime And CheckOutTime of the employee.
    What I need that when I click on the Image button it Should displays The Current Datetime into the label below the Image button.
    So I have Problem accessing my CheckInCheckOut Table because I may not have Idea about.Did you understand what I need to do, if you have more question please ask to me.
    Thanks
    Ali

  • How to total amounts from different categories using pop-up menus?

    I am working on personal financing using Numbers for the first time. I have formated the "Category" cells in the "Transactions" table to be pop-up. Meaning ... I click on the cell and select the appropriate category (Bills, loans, grocery, eating out, etc.) How do I get the amount that I've entered for certain categories to populate into the "Acount Categories" table? Ex -- Moving $1.06 from the "Transactions" table to the "Account Categories" table. Eventually, there will be multiple entries for each category and I want a total to show up in the upper table which I have already formated to turn into a pie chart. Thanks.

    Hi smessen,
    The formula in cell B2 of Account categories was originally: =SUMIF(Transactions :: $D,A2,Transactions :: E)
    You have apparently deleted column A of Transactions, so the formula needs revision to accomodate that change.
    Account Categories::B2: =SUMIF(Transactions :: $C,A2,Transactions :: D)
    Fill the formula down to B9.
    Items in the list in column A of Account Categories must exactly match those in the list in the pop-up menu cells in column C of Transactions. Remember to include "Deposit" in the menus to mark an amount that will not be included in the Account Categories table. You can also include a menu item such as "Choose", "-" or " " (single space) to use as the default value for unused rows.
    Regards,
    Barry

  • How to get Session from different namespace?

    Hi,
    I´m trying to get a session from a different namespace, how can I do this?
    For example: I´m setting some session parameters with session.setAttribute in
    a namespace called "customer", and trying to get this parameters in a namespace
    called "main".
    In my webflow, I am using a proxy node to call the page in the other namespace.
    I will always recieve a session from the other namespace. But, when I try to get
    the parameters, I think the session have been lost.
    Can anyone help me?
    Thanx. CSN
    Thank

    Why? Because that's what the J2EE specification says should happen.

Maybe you are looking for

  • Links in template don't work in the children

         I have created a template in CS4 with graphic roll over links. I have made six pages from this template and then gone back to the template to connect the links in the menu bar. Why don't the links work on the six pages in a browser?

  • Trade in iphone 5 black 16 gb to iphone 5 white 32 gb?

    I have a iPhone 5 Black, 16 gb. & I want to upgrade it to a iPhone 5 White, 32 gb. How can I do that?

  • Calling a  java application in windows enviroment from a browser

    so for example first you install my java application. Then you surf to www.example.com and the page on that site calls my application installed on windows. Is this possible? thanks

  • Group Messaging errors

    I cannot send or receive group messages when one or more member of the group is not on iMessage.  I have group messaging turned on in settings and send as SMS or MMS as well. This problem is on my iPhone and on my Mac. Does anyone have any suggestion

  • 10.2 not working on WinXP SP3 Firefox or IE8

    Hi there, We have about 250 Windows PC's (Mix of HP DC7800/7900/8000elites), running Windows XP SP3 and IE8 and Firefox 3.6.13. Since this latest update users have complained they cannot see any youtube content, the screen is black. I have tried unti