Hi everyone,
I'm very new to Power Automate (so please forgive me!) and I'm having a problem filtering on a Boolean value. I've looked around various forums and have tried many different syntax for the filter (e.g. sic_deceased eq '1', sic deceased eq 1, sic_deceased eq "1" etc), but nothing seems to work for me.
What I'm initially trying to do is filter down where sic_deceased is TRUE (the field is either TRUE or FALSE in Dynamics), so that I can then list these rows. When I try the filter as shown below I get the following error:
Exception parsing sic_deceased eq '1' submitted for attribute filterexpression of callback registration. Target entity: contact. Exception: Microsoft.OData.ODataException: A binary operator with incompatible types was detected. Found operand types 'Edm.Boolean' and 'Edm.String' for operator kind 'Equal'.
at Microsoft.OData.UriParser.BinaryOperatorBinder.PromoteOperandTypes(BinaryOperatorKind binaryOperatorKind, SingleValueNode& left, SingleValueNode& right, TypeFacetsPromotionRules facetsPromotionRules)
Any help would be much appreciated.
Many thanks,
Jon
Hi @Chriddle,
We get a lot of questions about the OData Filter queries in SharePoint, to be fair. Easy mistake to make, has happened to me as well many times. 😂
Yes, that syntax for the boolean field seems to work as well. I learned something new about the OData filter query of the List rows action, thanks for sharing 😀
At least it was obvious from my post, that I missundertood something 🤣
Shouln't just
sic_deceased
be sufficient if its value is boolean?
😳
odata filters in Sharepoint are weird 🙄
Try
sic_deceased eq 1
Hi @Expiscornovus
Thank you so much - that has worked. The syntax that you gave to me must have been the only one that I hadn't tried before!
Best wishes
Jon
Hi @jonclaylondon,
This is a two options set type of field, correct? Like the error message says that field would be of type Edm.Boolean. Have you tried using a boolean type value like true or false?
Try the below syntax?
sic_deceased eq true
For reference a different thread about the same subject: https://powerusers.microsoft.com/t5/Building-Flows/Filter-query-on-quot-Two-options-quot-field-not-working/m-p/759413/highlight/true#M104823