1

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.

0

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.

  • It is not working when we join two lists. – Vijay Jul 2 '15 at 10:41
  • I updated my answer. – ECM4D Jul 2 '15 at 10:50
  • Thanks a lot for quick reply. I have lookup, yes/no columns for filter is there any solution for that. ? – Vijay Jul 2 '15 at 10:55
  • I updated my answer again. – ECM4D Jul 2 '15 at 10:58
  • You are awesome !!!!! thanks alot its working for me. – Vijay Jul 2 '15 at 11:16

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.