I need to get the value of a yes/no field with fetch xml on a service page, in javascript i would do something like this
var varQ5 = $('#lc_yesnofield_0')[0].checked;
in fetch xml i have tried many variations of this
{%- assign ownerid = request.params["id"] -%}
{%- if ownerid -%}
{%- fetchxml lookupfacility -%}
<fetch no-lock="true" distinct="true">
<entity name="lc_owner">
<attribute name="lc_ownerid" />
<attribute name="lc_yesnofield" />
<filter>
<condition attribute="lc_ownerid" operator="eq" value="{{ ownerid }}" />
</filter>
</entity>
</fetch>
{%- endfetchxml -%}
{%- assign results = lookupfacility.results.entities -%}
[
{%- for facility in results -%}
{ "ownerid" : "{{facility.lc_ownerid}}", "yesnofield" : "{{facility.lc_yesnofield.Value}}" } {%- unless forloop.last -%},{%- endunless -%}
{%- endfor -%}
]
{% else %}
[]
{% endif %}
anyone able to point me in the right direction?