CAML query in JSOM for SharePoint 2013 results in “value does not fall in the expected range”

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/148011

Domanda

While querying yes/no column using caml query JSOM sharepoint 2013 getting "value doesnot fall in the excpeted range".

 <ProjectedFields>
 <Field Name="DateColumn" Type="Lookup" List="Employee_Table" ShowField="DateColumn" />
 <Field Name="yes_noColumn" Type="Lookup" List="Employee_Table" ShowField="yes_noColumn" />
  </ProjectedFields
  <FieldRef Name="DateColumn"/> 
  <FieldRef Name="yes_noColumn"/>
  <Query>
  <Where>
  <Or>
<Eq><FieldRef Name="yes_noColumn"/><Value Type="Boolean">true</Value>        </Eq>
  <Leq><FieldRef Name="DateColumn"/><Value Type="DateTime"><Today OffsetDays="-180" /></Value></Leq> 
  </Or>
  </Where>
  </Query>
  </View>

If I remove this yes/no column type from condition and put some "text" type column it is working. Am getting error for thr type "yes/no" column.

I tried with

Boolean --> true

Boolean --> True

Boolean --> TRUE

Boolean --> 1

Integer --> 1

bit --> 1

None of them are working.

È stato utile?

Soluzione

SharePoint join has some limitations. You can check here is this blog. It seems that Boolean fields is not supported. Hope this helps.

But Calculated fields are supported. So you could try create calculated column with value of your boolean column (like, 1/0), store it as text value, and then you could try query by this calculated column.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top