Tag Info

New answers tagged

0

I recommend using the build-in JS functions of SharePoint to work with these kind of errors. Try using escapeProperly() Here is a page that lists some of those functions: https://praneethmoka.wordpress.com/2012/01/12/some-useful-javascript-variablesfunctions-in-sharepoint/


0

Usually in SharePoint 2013 REST special characters are escaped using HTML encoding in query string. If you are using JavaScript try using encodeURIComponent method to format your CAML query variable value. More about it: http://www.sharepointyammertech.com/2014/12/sharepoint-2013-how-to-handle-special.html


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, ...


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'/>


0

well, just try to adding View Scope='RecursiveAll'. have a look <View Scope='RecursiveAll'><Query><Where><And><Geq><FieldRef Name=\"ows_Created\" /><Value IncludeTimeValue=\"TRUE\" Type=\"DateTime\">2013-01-01T15:55:52Z</Value></Geq><Leq><FieldRef Name=\"ows_Created\" /><Value ...


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 ...


0

The In elements primary function is to find IDs or text values in e.g. Lookup, Managed Metadata, User, and Choice fields. You can not use it like you're trying to. For what you are trying to do, using an Or operator together with Eq would be adequate and preferred. <Or> <Eq> <FieldRef Name="Created" /> <Value ...


0

Hopefully you do LinqToSharepoint in the correct way. However, I guess, you have a List where the requests itself are contained My Question is: Why donĀ“t you activate Attachments for that list? That way you have all the necessary files attached to the corresponding request-Item and do not have to make an separate Request


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.


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 + ...


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">" ...


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 = ...


0

I tried with the answer mentioned by Daniel but was unable to get the result. I have been able to get a file with a particular name from the document set by the following approach: Fetch all the items of the Document library Check whether the item is a document or not If it document set, check whether it has subfolders When is does not have sub folders, ...



Top 50 recent answers are included