1

This question is an exact duplicate of:

I wonder if someone can help me with a caml-query. I want to retreive list items from different list that has the column name "Link". But it should only retreive if the column has a value. How can I solve this with CAML-query?

Right now I tried to solve it with an if statement. But I get "undefined" and "null" because some of the list has the column name without any value or the list doesnt have the column name "Link".

Thanks!

marked as duplicate by Eric Alexander Oct 4 '15 at 0:57

This question was marked as an exact duplicate of an existing question.

1

You can use <IsNotNull> to check for non-null values in caml query. You can try below query:

<Where><IsNotNull><FieldRef Name='Link' /></IsNotNull></Where>
  • Thank you for your answer. Actually I tested that query but I get this error message: "One or more field types are not installed properly. Go to the list settings page to delete thse fields." – Sunreuz Oct 3 '15 at 20:00
  • I also looked up every list in SharePoint that has the column name "Link" – Sunreuz Oct 3 '15 at 20:01
  • Yes that is because the one of the column name you have used is wrong or that column does not exist in the list. Make sure you use the internal name of the column in your call query – Unnie Oct 3 '15 at 20:01
  • Yes but how can I query to only show the list items that has the column "Link"? – Sunreuz Oct 3 '15 at 20:09
  • Lets assume I got 10 lists and some of the list has column name "Link" but I dont know which of them. – Sunreuz Oct 3 '15 at 20:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.