Click here to Skip to main content
14,106,748 members

SharePoint

 
QuestionInsert a value into field during upload Pin
Member 110259242-Oct-14 16:35
memberMember 110259242-Oct-14 16:35 
AnswerRe: Insert a value into field during upload Pin
Ingo28-Oct-14 7:55
memberIngo28-Oct-14 7:55 
QuestionCanceling or Terminating a workflow Pin
Aptiva Dave26-Sep-14 4:42
memberAptiva Dave26-Sep-14 4:42 
Questionaudience targeting in Listview webpart using xml or C# in sandbox solution Pin
Ravi Ahir18-Sep-14 2:08
memberRavi Ahir18-Sep-14 2:08 
GeneralEvent Calendar Listing Web Part (SharePoint 2010) Pin
Awhitlow17-Sep-14 10:35
memberAwhitlow17-Sep-14 10:35 
QuestionVisual Studio Express \ New Project --> Sharepoint Workflow missing? Pin
devvvy12-Aug-14 13:45
memberdevvvy12-Aug-14 13:45 
AnswerRe: Visual Studio Express \ New Project --> Sharepoint Workflow missing? Pin
Richard MacCutchan12-Aug-14 21:18
protectorRichard MacCutchan12-Aug-14 21:18 
QuestionCAML Joins in Javascript Pin
Jay Royall5-Aug-14 5:59
memberJay Royall5-Aug-14 5:59 
Hi,

I'm fairly new to developing apps for Sharepoint so please go easy! I'm having a problem joining two lists using CAML in Javascript. What I'm trying to do may not even be possible but from the research I've done so far I believe it should be, but I'm obviously going wrong somewhere.

There are two lists in my app that are joined by a lookup column. The parent list is named TransactionHeader and the child list is named TransactionItems. For every item in the TransactionHeader list there will be one or more related items in the TransactionItems list. What I'm trying to do is retrieve items from the TransactionItems list but join to the TransactionHeader list so that I can also retrieve related data.

The CAML I'm using is as follows:

var query;
        query += "<View>";
        query += "  <ViewFields>";
        query += "      <FieldRef Name='ItemStatus' />";
        query += "      <FieldRef Name='ItemDate' />";
        query += "      <FieldRef Name='myReviewedBy' />";
        query += "  </ViewFields>";
        query += "  <ProjectedFields>";
        query += "      <Field Name='myReviewedBy' Type='Lookup' List='myTransactionHeaders' ShowField='ReviewedBy' />";
        query += "  </ProjectedFields>";
        query += "  <Joins>";
        query += "      <Join Type='Left' ListAlias='myTransactionHeaders'>";
        query += "          <Eq>";
        query += "              <FieldRef Name='TransactionHeader' RefType='Id' />";
        query += "              <FieldRef List='myTransactionHeaders' Name='ID'>";
        query += "          </Eq>";
        query += "      </Join>";
        query += "  </Joins>";
        query += "</View>";



This CAML always results in a 'Cannot complete this action' message being displayed.

A little more information in case it's important; after building the query I'm loading the TransactionItems list like so:

var ctx = new SP.ClientContext.get_current();
        var camlQuery = new SP.CamlQuery();
        camlQuery.set_viewXml(myCaml);
        var list = ctx.get_web().get_lists().getByTitle("TransactionItems");
        ctx.load(list);
        TransactionItem.TransactionItems = list.getItems(query);
        ctx.load(TransactionItem.TransactionItems);
        ctx.executeQueryAsync(readItemsSuccess, error);



If anybody can give me a steer as to where I'm going wrong it would be appreciated. If you need any more info then please ask.

Thanks

Jay
AnswerRe: CAML Joins in Javascript Pin
Beginner Luck31-Jan-16 18:06
professionalBeginner Luck31-Jan-16 18:06 
QuestionSharePoint Thread Pin
Ismail.amx21-Jul-14 22:58
memberIsmail.amx21-Jul-14 22:58 
AnswerRe: SharePoint Thread Pin
Ingo16-Sep-14 5:17
memberIngo16-Sep-14 5:17 
QuestionCBT Web based development tool Pin
manoharbalu13-Jul-14 22:43
membermanoharbalu13-Jul-14 22:43 
QuestionRe: CBT Web based development tool Pin
Ingo16-Sep-14 5:19
memberIngo16-Sep-14 5:19 
QuestionNeed to Update a SharePoint list from a client -- Can it be done Pin
phanks30-Jun-14 4:18
memberphanks30-Jun-14 4:18 
AnswerRe: Need to Update a SharePoint list from a client -- Can it be done Pin
phanks3-Jul-14 10:53
memberphanks3-Jul-14 10:53 
Questionsharepoint and http web service Pin
Member 1051075722-Jun-14 20:19
memberMember 1051075722-Jun-14 20:19 
AnswerRe: sharepoint and http web service Pin
Ibrahim Khatri22-Jun-14 21:41
memberIbrahim Khatri22-Jun-14 21:41 
Questionsharepoint and Pin
Member 1051075722-Jun-14 20:18
memberMember 1051075722-Jun-14 20:18 
QuestionHow to get the document information along with Versions and Content of that particular version in Sharepoint Pin
Member 850327419-Jun-14 20:25
professionalMember 850327419-Jun-14 20:25 
AnswerRe: How to get the document information along with Versions and Content of that particular version in Sharepoint Pin
Ibrahim Khatri22-Jun-14 21:37
memberIbrahim Khatri22-Jun-14 21:37 
QuestionUnable to change Variation Label Name in Sharepoint 2013 Pin
KaushalJB19-Jun-14 2:45
professionalKaushalJB19-Jun-14 2:45 
AnswerRe: Unable to change Variation Label Name in Sharepoint 2013 Pin
Bhargava Consultant8-Jul-14 2:43
memberBhargava Consultant8-Jul-14 2:43 
QuestionYoutube embed link in iframe not able to play in Sharepoint 2013 WebPart Pin
KaushalJB18-Jun-14 1:18
professionalKaushalJB18-Jun-14 1:18 
AnswerRe: Youtube embed link in iframe not able to play in Sharepoint 2013 WebPart Pin
Ibrahim Khatri22-Jun-14 21:43
memberIbrahim Khatri22-Jun-14 21:43 
Questionsharepoint 2010 conditional formatting in discussion board not working Pin
Ayan Chalki12-Jun-14 19:45
memberAyan Chalki12-Jun-14 19:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Cookies | Terms of Service
Web01 | 2.8.190518.1 | Last Updated 17 May 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid