I have created a column in SharePoint named Data e skadimit të kontrates and I am trying to query this column with the following query:

queryMuaj.Query = @"<Where><Eq>
                 <FieldRef Name='Data e skadimit të kontrates' />
                 <Value Type='DateTime'><Today /></Value>

but it shows me a masive error like this:

enter image description here

  • 2
    The internal field name is wrong, it isn't going to have spaces in it – Eric Alexander Jul 7 '16 at 14:07

In CAML Query you should use field internal name instead of Display Name.

You can get the internal name for a column by browsing to the List Settings > Edit Column and look at the QueryString value Field.

  • for example is this an internal name: Data_x0020_e_x0020_skadimit_x002 ? i am getting it on link – Nderon Hyseni Jul 7 '16 at 14:16
  • 1
    YEs that is the name you should use – Amal Hashim Jul 7 '16 at 14:17
  • 2
    I love you it worked – Nderon Hyseni Jul 7 '16 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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