Tag Info

Hot answers tagged

4

Seems to me you have not a complete understanding of the logic you are trying to write? Let me give you an example of how your code works now: You have items 1 2 3 4 5 6 7 8 9 10 You retrieve them backwards (say you set RowLimit=5 for now) so you will get: 10 9 8 7 6 Then you save the 6 in a variable When the user click on "Show more" or whatever, ...


3

Create a custom view of the list and select radio button Show items only when the following is true: created by is equal to type [Me] save the list. function getItemsFromView() { var context = new SP.ClientContext.get_current(); var list = context.get_web().get_lists().getByTitle('ListName'); var view = ...


2

The Author column is of LookUp Type. Here is the complete list. var ctx = new SP.ClientContext.get_current(); var list = ctx.get_web().get_lists().getByTitle("Vacation Replacement"); var query = new SP.CamlQuery(); var specifier = "<Where><Eq><FieldRef Name='Author' LookupId='True'/><Value ...


2

To get current user Id clientContext = new SP.ClientContext.get_current(); var user=clientContext.get_web().get_currentUser(); clientContext.load(user); clientContext.executeQueryAsync(function(){ var userId=user.get_id(); var query="<Where><Eq>"+ "<FieldRef Name="Author" LookupId="TRUE" />"+ "<Value Type="Integer">" ...


2

SPQuery query = new SPQuery(); query.Query = @"<Where><Eq><FieldRef Name='Author' LookupId='TRUE' /><Value Type='Integer'>" + _id + @"</Value></Eq></Where><OrderBy><FieldRef Name='Created' Ascending='False' /></OrderBy>"; where _id is user's ID.


2

CAML schema is case-sensitive. You need to change <values> to <Values>. In general all elements are capitalized, but for some reason there are elements like <CHOICES> written in uppercase. When in doubt, best reffer to Collaborative Application Markup Language (CAML) schemas on MSDN.


1

Use <FieldRef Name='Shelf'/> instead of <Field RefName='Shelf'/>


1

Here is the Similar Question Paging. You can get the nextPagingInfo using OOTB function nextPagingInfo = spItems.get_listItemCollectionPosition().get_pagingInfo(); You need to frame the prevPagingInfo and "Created" doesn't work for sorting. Use "Created_x0020_Date" instead.You can get the Original Source Code form MSDN. I used angular with this function ...


1

Actually there are two errors: Looking up "by value" (without the LookupId="True" attribute) needs me to pass only the value of the field referenced/show; in other words the value right of the ;#: <Query> <Where> <Eq> <FieldRef Name="Contrato"/> <Value Type="Lookup">ABAP14</Value> </Eq> ...


1

Replace <Where> <IsNotNull> <FieldRef Name='CheckoutUser' /> </IsNotNull> </Where> with <Where> <Geq> <FieldRef Name="CheckoutUser" LookupId="TRUE" /> <Value Type="int">0</Value> </Geq> </Where>


1

var context = new SP.ClientContext.get_current(); var list = context.get_web().get_lists().getByTitle("ListName"); var cQuery = new SP.CamlQuery(); var camlXML = "<View><Query><Where><Eq><FieldRef Name='Author' LookupId='True'/><Value Type='Lookup'>" + _spPageContextInfo.userId + ...



Only top voted, non community-wiki answers of a minimum length are eligible