Tag Info

New answers tagged

1

Couldn't you refactor the SPServices call into another function, that takes the "area" value, "topic" value, and the list selector as parameters? You'd still be querying the list 24 times, but it will look a lot cleaner. $(document).ready(function () { QueryNewsList("highlights", "company", "#highlights1"); QueryNewsList("downfalls", "company", ...


1

Are you using a field whose name exceeds 32 characters? There are problems with these fields names in SharePoint 2010 only when used in ViewFields clause.


2

It's been a while since I've looked at this but I think you need to indicate the Field can be null or empty <ViewFields> <FieldRef Name='Field1' /> <FieldRef Name='Field2' Nullable='True' /> <FieldRef Name='Field3' Nullable='True' /> </ViewFields>


0

Replace SP.SOD.executeFunc('sp.js', 'SP.ClientContext', getSWDocs); with SP.SOD.executeFunc('sp.js', 'SP.ClientContext', getSWDocsSuccess);


1

I haven't seen domain\username be used reliably to directly query the list. What I have done though, is use the GetUserInfo web service to get the user id, and then pass that through to my CAML in another function. Pseudo code: function getListItemsForUser(userid){ var caml = "<Where>"+ "<Eq>"+ "<FieldRef ...


0

I have recently created CAML Query designer based on my own requirements and I am giving that as an utility for free. Hope this will help SharePoint developers in better way. http://praveenbattula.blogspot.com/2015/02/download-caml-query-designer.html


0

I found a solution to my problem here. You have to remove the GetItems function from the AnonymousRestrictedTypes via powershell. Hope this helps others with this issue.


0

Test The CAML Generator is a Durandal SPA web application. It generates code that you can use to query SharePoint via: jQuery, Javascript Client Object Model, SharePoint Server Object Model, and SharePoint Client Object Model.The CAML Generator is a Durandal SPA web application. It generates code that you can use to query SharePoint via: jQuery, Javascript ...


0

The conclusion I've come to is that you cannot perform an IsNull query against an indexed column. Workarounds include: not indexing the column (and be careful of the view threshold...) query all items and perform the filtering in code (inefficient) change your data such that null values are replaced with a special 'dummy' value you can query against. This ...


1

In On Premise environment, we can disable the “Require Use Remote Interfaces permission” to let anonymous users access Client Object Model in Central Administration. If it is an Online environment, you can use SP.Site.updateClientObjectModelUseRemoteAPIsPermissionSetting Method to do the trick. <script type="text/javascript"> ...


0

You need to use SPSiteDataQuery instead of SPQuery. MSDN link However, The CSOM does not provide a mechanism for querying data across multiple lists that are not associated by a lookup field. In other words, there is no client-side functional equivalent of the SPSiteDataQuery class. If you need to perform a cross-list query from client-side code, ...


0

One way to generate the CAML query is to start with a SharePoint list view. If you can use the view dialog to define the filter and the sort, then you can grab the corresponding CAML with SharePoint Designer. In this case, you may want to create a view on the EmployeeList. Filter by Title with "contains" and the desired string. Use the Sort section to ...


0

Here is a sample CAML Query: <Query> <Where> <Contains> <FieldRef Name='Title' /> <Value Type='Text'>1234</Value> </Contains> </Where> <OrderBy> <FieldRef Name='Title' Ascending='False' /> </OrderBy> </Query> In CAML Like may be done ...


1

Your OR and AND tags are not correct. They should wrap the two items being operated: <Query> <Where> <And> <Or> <IsNull> <FieldRef Name='PublishingStartDate' /> </IsNull> <Leq> <FieldRef Name='PublishingStartDate' /> ...


1

Just found a link for this.. A possible workaround. Relevant part: Create calculated column with formula comparing the two fields, final value as boolean Use this column in caml query like any other boolean (yes/no) column


0

I think you should using LINQ. var a= from c in olist.Items.OfType<SPListItem>() Where convert.ToString("ColumnName1") != convert.ToString("ColumnName2") select c; Ref


1

I found a solution, I was fetching value of title from querystring so it automatically removes the Plus(+) sign. So I created the url like this www.abcd.com/default.aspx?Title=encodeURIComponent(mytitle) It is working fine now.


0

The query is not properly formatted. You should specify the lookup ID of the term that you want to match. like: <FieldRef LookupId="TRUE" Name="ItemType" /> Here is a sample example showing how to work with metadata columns: <Query><Where><In><FieldRef LookupId="TRUE" Name="ItemType" /><Values><Value ...


0

Instead of Contains you should use <Gt> (Greater than) or Lt (Less than). Contains operator works with String type. Since you are using decimal you should always use arithmetic logic operators.


0

Firstly the Query is not properly created. Editor and Author are User type fields i.e Value Type='User'. Similarly, the LookupNumber in your case seems to support multiple values, hence the type should be Value Type='LookupMulti'. This is how your query should look like: <Query> <Where> <Or> <Contains> ...


0

You have mentioned <FieldRef Name="Lookup" />. It should be <FieldRef Name="LookupNumber" /> looking at your columns. Not sure whats your exact requirement but you may want to use LookupId="TRUE" and test again. Ref: http://blogs.msdn.com/b/voyage/archive/2014/06/09/caml-queries-to-remember.aspx ...



Top 50 recent answers are included