Filter on bit field

Jun 9, 2011 at 1:17 PM

I would like to be able to filter the displayed pushpins based on a certain bit (boolean) field. I tried this:

    <Conditions>
      <mapcondition text="Name: ">
        <condition attribute="st_name" operator="like" value="%{0}%" />
        <value type="string" default=""></value>
      </mapcondition>
      <mapcondition text="24h assistance: ">
        <condition attribute="st_24hassistance" operator="eq" value="{0}" />
        <value type="bit" default=""></value>
      </mapcondition>
    </Conditions>

Both name and 24 assistance show up in the upper left corner. When I type into the name field and press Load the pushpins are correctly filtered, but that doesn't work for the other field. The first question is what value type should be in this case (I tried bit, bool and boolean) and the second question is what I should type into the textbox (I tried True).


Jun 10, 2011 at 3:44 PM

Please try this: <value type="string" default=""></value>

Try giving values 0 or 1 in the filter field on map. 0 for false and 1 for true. I'm guessing that this field is of type "Two Options".

Currently it is supported only for string types. But the plan is to extend it for other types(like 'Two Options', 'OptionSets', 'EntityReference'). I've added it in first place, so that someone else can also add new logic without changing too much.

So, currently user has to fill 0 or 1 in the field. Ideal is to let user choose true or false from dropdown.

Jun 14, 2011 at 8:23 AM
      <mapcondition text="24h assistance: ">
        <condition attribute="st_24hassistance" operator="eq" value="{0}" />
        <value type="string" default=""></value>
      </mapcondition>

doesn't work. I still get all instances, regardless if I put a 1 in the field and push Load.

Jun 18, 2011 at 1:57 PM

Can you please tell the field type "st_24hassistance" by looking in Customizations area. Also, please ensure that the fetchxml getting generated is valid. You may validate that using AdvancedFind.

 

Thanks,

Atul