1

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>
              </Eq></Where>";

but it shows me a masive error like this:

enter image description here

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

1 Answer 1

2

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.

3
  • for example is this an internal name: Data_x0020_e_x0020_skadimit_x002 ? i am getting it on link Jul 7, 2016 at 14:16
  • 1
    YEs that is the name you should use Jul 7, 2016 at 14:17
  • 2
    I love you it worked Jul 7, 2016 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.