cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gautam
Regular Visitor

Filter data in Gallery using Enum field

Hi,

 

I have data source PurchaseOrderHeader for my powerApps, I want to filter data in Gallery based on one field of type ENUM namely PurchaseOrderStatus, suggest me how do I achieve this.

I tried this code but its throwing error

Filter(PurchaseOrderHeader,PurchaseOrderStatus = "Ordered")

Thanks.

2 REPLIES 2
v-xida-msft
Community Support
Community Support

Hi @Gautam,

 

Could you please share a bit more about the PurchaseOrderHeader data source within your app?

Could you please share a bit more about the ENUM type column that you mentioned? Is it a Choice type column in SP list?

 

Please take a try to modify your formula as below:

Filter(PurchaseOrderHeader,PurchaseOrderStatus.Value= "Ordered")

then check if the issue is solved on your side.

 

If you could provide more details about your scenario, we could provided a proper workaround for you.

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I know this thread is old but i'm facing a similar issue where I am not able to filter on Enums using the Dynamics Finance and Operations Connector (using CDS is not an option). In my App I have the following filter

 

Filter(Datasource,EnumField= "Null")

 

In this case Invoice is a custom Enum field. I get the following: An error has occurred. A binary operator with incompatible types was detected. Found operand types 'Microsoft.Dynamics.DataEntities.EnumField' and 'Edm.String' for operator kind 'NotEqual'.

 

I have seen a solution posted to convert the enumfield into a string to compare however this will make the query  non-delegatable and therefore is not an acceptable solution.

 

I know the correct Odata Syntax for this however I can't seem to cast the "Null" string as the enum type through the filter function.

 

Is there a way to filter on Enums using the finance and operations connector and still maintain delegation?

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,428)