Fetch Data from two different Lists (Based on criteria)

I have two lists. One is for Designations and another is for
Hirings. Designations list holds all available designations and Hiring list has list of hired employees. Data may look like following...
Designations list:
PostTitle
Software Engineer
Web Developer
Graphic Designer
Trainer
Manager
Team Lead
and Hiring list may look like following
Hirings list:
PostTitle
Employee
Start Date End Date
Trainer David
05-Jun-14
Manager Peter
06-Jun-14 30-Jun-14
PostTitle is lookup column in hirings list. Now, I have to create several views over this data... one of them is of "Vacant Posts" that will fetch all those records from Designations which are either not referenced in hirings or are referenced
in hirings but has some end date.
Vacant Posts View:
Fetch all records from Designation which are NOT in Hirings
UNION
Fetch all records from Designations which are in Hirings But has some END DATE.
Please guide me how can I create this Vacant Posts view ? Is their any out of the box functionality available ? what are the easiest possible ways to accomplish this?
Zia.

Yes You can Use CAML.
Below Query can be helpful to start with.
Function GetSharePointList1() {
context = SP.ClientContext.get_curre
nt();
    oList = context.get_web().get_lists().getByTitle('SharePoint List 2');
    var camlQuery = new SP.CamlQuery();
    camlQuery.set_viewXml(query);
    items = oList.getItems(camlQuery);
    context.load(items);
    context.executeQueryAsync(
        Function.createDelegate(this, onSuccessSharePointList1),
        Function.createDelegate(this, onFail)
function onSuccessSharePointList1(){
        recNum = items.get_count();
      if(recNum != 0){
         var listItemEnumerator = items.getEnumerator();
         while(listItemEnumerator.moveNext()){
                var oListItem = listItemEnumerator.get_current();
                $().SPServices({
                operation: "GetListItems",
                async: false,
                listName: "SharePoint List 2",
                CAMLViewFields: "<ViewFields><FieldRef Name='Worklocation'/></ViewFields>",
                CAMLQuery: "<Query><Where><Eq><FieldRef Name='Title'/><Value Type='Text'>" + ReferenceID +
                                          "</Value></Eq></Where></Query>",
                completefunc: function (xData, Status) {
                  $(xData.responseXML).SPFilterNode("z:row").each(function() {
                    Worklocation = ($(this).attr("ows_Worklocation"));
                 s = ..... (display all in table format)
              $("#resultTable").append(s);
              i++;
Thanks and Regards Rahul Dagar

Similar Messages

  • Differentiating Master Data from two different source systems

    Friends,
    i have used standard InfoObjects that provide master data for two InfoCubes which take data from two different source systems. Now the some of the master data is identical in both the source systems (example: 10 stands for "Industrial" in one whereas 10 stands for "Agricultural" in the other). What do i do so that the system(BW) differentiates the two.
    Thanks in advance for all the help.
    Mike

    I tried to include the 0SOURSYSTEM in the compounding of this InfoObject (for master data) but it gives me a list of other objects that use this InfoObject as a reference characteristic and also says that this InfoObject is used in a ODS and data needs to be emptied in the ODS before activating  this InfoObject.  Please let me know if there is any way out of it.
    Thanks
    Mike

  • APEX Application accessing data from two different databases

    Hi All,
    Currently as we all know that APEX Application resides in database and is connected to the schema of that database.
    I want APEX Application to be running and accessing data from two different databases. Elaborating my question,
    Currently, my APEX Production Application is connected with XXXX Schema of DB1 Database(Where APEX Resides). Now I want to add some pages into this APEX Application for REPORT Purpose, But I want to connect this REPORT APEX Pages to get data from Different Schema YYYY for Database DB2.
    Is it possible to configure this scenario?
    The reason for doing this is to avoid the REPORT related (adhoc queries) resource utilization effect on Production DB1 Database.
    Thanks
    Nil

    1. If you do the joining of two or more tables in DB1 then all data is pulled over to DB1 and then the join is executed: so more data over the databaselink and more work for DB1. Better keep the joining stuff where the data resides and just pull exactly that data over that you need.
    2. Don't know about your different block sizes. Seems a nice question for one of the other forums (DBA or SQL).
    3. I mean create synonyms on DB1 for reports VIEWS in DB2.
    Hope all is clear!

  • Is it possible to show data from two different sql tables?

    Is it possible to show data from two different sql tables? Either to show combined data by using a join on a foreign key or showing a typical master detail view?
    I have one table With data about a house, and another table With URL's to images in the blob. Could these two be combined in the same Gallery?
    Best regards Terje F - Norway

    Hi Terje,
    If you have a unique key, you could use one of the following functions for your scenarios:
    If you only have one image per house, you can use LookUp:
    http://siena.blob.core.windows.net/beta/ProjectSienaBetaFunctionReference.html#_Toc373745501
    If you have multiple images per house, you can use Filter:
    http://siena.blob.core.windows.net/beta/ProjectSienaBetaFunctionReference.html#_Toc373745487
    Thanks
    Robin

  • Selecting data from two different tables.

    Do we need to use join two tables with primary/foreign key while trying to use select statement for getting data from those to table.? If no who can i go about do it.

    872959 wrote:
    If i am using From clause to get data from two different tables, is it necessary that both tables have column of identical data in them.In general, they ought to (or you need to join in a third table that tells you how to map rows from one table to rows of the other table).
    It is not strictly necessary that there be any join condition between tables. If you don't provide a join condition, Oracle has to do a Cartesian product. That means that if there are n rows in one table and m rows in the other, the result set will have n * m rows. It is very rarely a good idea to write queries that do Cartesian products but it does occasionally happen.
    Justin

  • Fetch Data from two Database

    I want to fetch data from two tables which are in two separate database. Is it possible to fetch similar from two schemas of same database.
    Pls help with query.

    Hi,
    Say you have two schema S1 and S2 in the same database 'xyz' then you can create two database links to these two schemas from any third schema as ::
    CREATE database link s1link connect to S1 identified by <password of S1> using 'xyz' ;
    CREATE database link s2link connect to S2 identified by <password of S2> using 'xyz' ;
    Now say if there is a table called tab1 in schema S1, then you can get data from it as ::
    SELECT T1.*
    FROM tab1@s1link T1
    WHERE < you can put conditions here> ;
    Similarly for the columns of a table of schema S2.
    - Thanks
    Sandipan

  • Fetch data from three different Essbase cube in to Reporting

    Hi Experts,
    I want to know how to fetch data from three different Essbase cubes in to HFR or smart view reports.

    If you create a multiple data source Financial Reports report, you get the best of both worlds:
    1) No code required reports
    2) You can view the reports in Workspace
    3) You can view the FR reports in SmartView
    Unless you really need it, I wouldn't go down the SmartView/VBA path, especially as you lose all ad-hoc capability with a mutli sheet retrieval with code. There are costs associated with going down the path of template reporting (which is what you are now talking about). See this thread for a good discussion of those costs:
    http://www.network54.com/Forum/58296/thread/1300202750/Template+Coding+Smartview+or+Classic+-Opinionson+time
    Remember, the people posting in this thread are pretty experienced practitioners, so unless you are a code god, I would multiply the estimates by 1.5 or 2 or 3, especially if you're learning the VBA functions for the first time.
    Just my $0.02.
    Regards,
    Cameron Lackpour

  • LDAP query to fetch users from Two different OU

    I am looking for an AD query to get AD enabled users from two different OU Stores & ServiceOffice under root domain.
    Using below syntax to fetch it simultaneously but not succeeding. Please help me.
    (&(objectCategory=person)(|(ou=Stores)(ou=ServiceOffice)))

    Hi Thanks for the revert. Actly i am setting this syntax in application not running powershell script to fetch users.
    So i need query in Ldap filter format only...
    i.e.
    (&(objectCategory=person)(|(OU=Stores,DC=Mumbai,DC=Users,DC=ABC,DC=com)(ou=ServiceOffice,DC=Chennai,DC=users,DC=ABC,DC=com)))
    Please correct my above query.

  • Loading master data from two different infosource.

    Hi Experts,
    I would like understand the mechanism behind loading data to masterdata infoobject from two different infosource.
    Ex: I have one master data infoobject called A and it has 4 attributes B C D E.
    now I am loading values for A B and C from INFOSOURCE1
           D and E is getting loaded from INFOSOURCE2.
    could ne one please explanin how this works and how all five values get merged in single record?
    Please help
    Best Regards
    Falgun

    Dear Falgun,
    Component of an InfoSource:
    An InfoSource is always a quantity of InfoObjects that logically belong together and are updated in data targets.
    a. <b>InfoSources with flexible update</b>
    An InfoSource with flexible update can be updated in any data targets (with the exception of hierarchies). Update rules are created for this InfoSource.
    InfoObjects can be used in as many InfoSources and data targets as you like.
    b. <b> InfoSources with direct update</b>
    Using an InfoSource with direct update, master data (characteristics with attributes or texts) for an InfoObject can be written directly (without update rules) to the master data table.
    Visit the following link for more information:
    http://help.sap.com/saphelp_nw04/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    Hope this is helpful.
    Regards,
    Naveen.

  • Report which reads data from two different systems

    Hi experts!
    By any chance, would be possible to create a report which is able to read from two different cubes and two different systems at the same time?
    Kind regards.

    Good afternoon Raul,
    It should be possible to create a multiprovider on the two different cubes from the two sources
    systems and report on this.
    Best Regards,
    Des

  • How do you display data from two different data-sets on one list

    I have a data-set that is displaying properly; I would like to add another data-set to the other portion of the form. 
     The first part of the data set has Product information (Product-Name, Product_number, etc),
     The second portion of the data-set has information like (Product-campaign, Product-Sales, etc)
    The two data-sets  are mutually exclusive

    Hi xitum,
    As
    Patrick  Hurst mentioned, if the several tables didn't have any relationship with each other and you want to put all the information together to display in one report, you need to add several tablix/list in the same report and each tablix/list to display
    the data from each table.
    If the several table have a same relationship field you can use the
    lookup function to get the other maped fields display in the same tablix/list.(this function supportted on the SSRS 2008 r2 and later version).
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Fetching data from two tables

    Hi friends,
    I've two similar tables A and B with one more column in table B that is "Active Flag".
    Table A
    Rowid----Fname----Lname
    101-----AF1----------AL1
    102----AF2-----------AL2
    103-----AF3---------AL3
    104-----AF4---------AL4
    Table B
    Rowid-----Fname---Lname---Flag
    101-----BF1----------BL1--------Y
    102-----BF2----------BL2---------N
    103-----BF3----------BL3--------N
    104-----BF4----------BL4-------Y
    I need to fetch data in Table C with column rowid, Fname and Lname.
    If Flag is Y in Table B, this record should come to table C otherwise the record from table A will come to C. Rowid is the primary key.
    Table C should be like this..
    Rowid-----Fname---Lname
    101-----BF1----------BL1
    102-----AF2----------AL2
    103-----AF3----------AL3
    104-----BF4----------BL4
    Thanks in advance

    Hi,
    try this
    QL> With T As
    2       (
    3          Select 101 Id, 'BF1' fname, 'BL1' lname, 'Y' flag
    4            From DUAL
    5          Union All
    6          Select 102, 'BF2', 'BL2', 'N'
    7            From DUAL
    8          Union All
    9          Select 103, 'BF3', 'BL3', 'N'
    10            From DUAL
    11          Union All
    12          Select 104, 'BF4', 'BL4', 'Y'
    13            From DUAL),
    14       T1 As
    15       (
    16          Select 101 Id, 'BF1' fname, 'BL1' lname
    17            From DUAL
    18          Union All
    19          Select 102, 'AF2', 'AL2'
    20            From DUAL
    21          Union All
    22          Select 103, 'AF3', 'AL3'
    23            From DUAL
    24          Union All
    25          Select 104, 'BF4', 'BL4'
    26            From DUAL)
    27  Select T1.Id, T1.fname, T1.lname
    28    From T, T1
    29   Where T.Id = T1.Id
    30     And T.flag='Y'
    31  /
           ID FNA LNA
          101 BF1 BL1
          104 BF4 BL4and rowid is oracle reserved word. you should be aware of oracle reserved word, kindly refer this v$reserved_words
    Edited by: user291283 on Sep 7, 2009 10:18 PM

  • Writing data from two different acquisition rates into one file

    Hi,
    I'm using a compactRIO, and I have an anemometer outputting data at 4Hz to the serial port on the controller, and I am using a 9237 module to read strain from two channels at 40Hz. I would like to record all this data in one file, but I'm unsure how to have the data points match up with respect to time since they are read at different rates. Basically I have 10 strain data points for every one anemometer data point, but that one data point needs to somehow be associated with the other 10 read in the same amount of time. It would be okay to "extend" the slower data to the 10 strain points, and likewise to the next ten when the anemometer refreshes its values.
    Thanks for any input!
    Andrew

    Check out the Queue multi-plexer vi from the examples.  C:\Program Files\National Instruments\LabVIEW 2009\examples\general\queue.llb\Queue Multiplexer.vi
    If each data acquisition loop enqueues data to one file writing loop the data is writen in order.  Queues are really a good way to multiplex data sources 
    Message Edited by Jeff Bohrer on 01-29-2010 09:44 AM
    Jeff

  • Taking data from two different server in a single table

    Hi All,
    can u plz tell me i want take a data from a two different server in a single table
    Thanks,
    Bell.

    Again, you have written the same sentence. I have 2 servers Server1 and Server2 and one table called my_table (You or God knows where this table is).
    Now tell us what you want to do ?
    Sidhu
    http://amardeepsidhu.blogspot.com

  • How to create a report to bring all data from two different Info providers

    Hi All,
    I have a peculier problem while creating a report. I have two custom info providers one DSO and another Cube. There are only two common fields between these two Info providers . I need to create a report such that the report displays all the values from DSO but user can have the selection option on one of the fields in the Cube.
    Here is an example
    DSO Contents:
    DocNum-     DocItem-     DocText-     Amount-      Quantity
    10000----     10----            ABC----          100----           10
    10001----     20----     DSN----     200----     10
    10005----     20----     DSN----     200----     10
    Z1003----     10----     CAN----     500----     1
    Cube Contents
    DocNum-     DocItem-     Date-----          InvoiceAmt
    10000----     10----     1/10/2009----         50
    10001----     20----      2/20/2009----        100
    10005----     20----      2/25/2009----        100
    The report needs to be displayed as shown below when the user selects value for date from 1/10/2009 to 2/20/2009
    DocNum-     DocItem-     DocText-     Amount-      Quantity
    10000----     10----     ABC----     100----     10
    10001----     20----     DSN----     200----     10
    I hope this was clear for you to understand. I would really appricate if any one can answers about how to resolve this problem. I cannot add the date filed to DSO and I also have Doc Num and Item as the user selection fields in the report.
    Thank you all in advance and i would really appreciate for your suggestions.
    Regards
    Chinna
    Edited by: chinna2479 on Mar 3, 2009 7:38 PM
    Edited by: chinna2479 on Mar 3, 2009 7:39 PM

    Hi chinna,
    Two possible options, I can think of now, but both of them may be a compromise with performance.
    1. create an infoset and then a query on top of it, provided we have a one to one relation in both the targets. That is, the combination of doc and item number is not duplicate in either cube or ODS.
    2. Create a master data object of doc and item number and have date as an attribute. Load that from cube data and make date as navigational attr.
    Use this navgntal attr for selection in your report.
    Let us know, if you require any further info.
    Naveen.A

Maybe you are looking for

  • Data Services job rolling back Inserts but not Deletes or Updates

    I have a fairly simple CDC job that I'm trying to put together. My source table has a record type code of "I" for Inserts, "D" for deletes, "UB" for Update Before and "UP" for Update After. I use a Map_CDC_Operation transform to update the destinatio

  • How do I transfer my iPhoto library from my old Mac Book to my new Mac Book Pro?

    I took delivery of my new mac Book Pro at the weekend and was unable to transfer all my data from my old machine at the time of set-up. Can someone tell me how I can transfer my iPhoto library to my new machine while keeping all photos in the events

  • Upgrade BW 7.3X or 7.4 - Compatibility IE10

    Hello experts, we want to upgrade BW from 7.01 to 7.3 or 7.4. The version final is not decide yet, we search the side effect. Today, our versions browsers are IE10 32 and 64 bits with windows 7 32 and 64 bits. SAP BW 7.3 and BW 7.4 PAM define IE10 64

  • Battery won't charge - intermittent

    Noticed this problem recently. The orange light is on but my battery won't charge. Although the battery is old (55 months) Coconut says capacity 100%, charger connected but that the battery is not charging. Intermittent charging does occur when power

  • Windows Update Complications with Itunes

    A few weeks ago, my computer pushed an update to windows that I didn't have the option to delay any further. I believe it was in connection with the Windows 8 / 8.1 update. After the update was pushed, I also upgraded iTunes to the most recent versio