Tag Info

New answers tagged

1

If you are creating a filtered view, yes you can filter by a date less than a certain date, so long as the column you are trying to filter on is a date column. This is standard SharePoint functionality dating back to 2003 at least.


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.


0

Now and Year don't honour the CalendarDate property whereas others do honour it. See my article about it http://www.sharepointnadeem.com/2015/05/sharepoint-recurring-calendar-events.html


1

#get web and ct $web = Get-SPWeb http://your/site/name $ct = $web.ContentTypes["CT name"] #get the column from the web $spFieldLink = New-Object Microsoft.SharePoint.SPFieldLink ($web.Fields["alias"]) #Remove the field from the ct and update $ct.FieldLinks.Delete($spFieldLink.Id) $ct.Update() #dispose the web-object $web.Dispose()


3

First one is wrong, because you can have only one Value child in Eq element. Second one is wrong, because you put your desired values in Type attribute. You've used correct syntax in first one: <Value Type='Text'>Ordered</Value> So the correct query is: <View><Query><Where><In><FieldRef ...


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


0

Replying to a discussion does not change the the Modified date of it, The reply will be created as a new Item with ParentPostId equals to current discussion item id, So there will be no modification on the Discussion Use "DiscussionLastUpdated" column to get the Last Modified date, I think this column also gets updated if a user likes/unlikes the item


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


1

If your field type is CALCULATED, it is a known behaviour to solve this you can use SPFieldCalculated object example: SPFieldCalculated cf = (SPFieldCalculated)item.Fields["AverageFeedBackRating"]; string cfVal = cf.GetFieldValueForEidit(item["AverageFeedBackRating"]);


3

CAML joins, to my knowledge, only work on the server side. To mimic that on the client side, you have to make several calls, storing the results in objects or arrays, parsing through that, and making further calls. This isn't a limitation of SPServices, but the underlying web services themselves.


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.


0

According to your condition following should be the CAML Query. Condition (Country == US) && (Status BeginsWith A || Status BeginsWith B || Status BeginsWith C || Status BeginsWith D || Status BeginsWith E || Status BeginsWith F) && (Relationship != NA || IsComplete == Yes || IsApproved == Yes) CAML Query <Where> <And> ...


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



Top 50 recent answers are included