cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

How to filter on enumeration field?

Hi there,

 

I have a custom entity (Event) with Title, Date and State fields. The State field's type is Enumeration of "Active/Inactive".

I want to filter my data to show only the active events.

What is the syntax of it?

 I set the Items property of the Gallery object to Filter('Event', Title = "xyz") works well, but Filter('Event', State = Active) nor Filter('Event', State = "Active") do not work.

 

Thanks,

Szabolcs

1 ACCEPTED SOLUTION

Accepted Solutions
Continued Contributor
Continued Contributor

Try Text() function to convert the State enumeration to string and compare as below.

 

Filter(Event, Text(State)="Active")

 

 

View solution in original post

2 REPLIES 2
Continued Contributor
Continued Contributor

Try Text() function to convert the State enumeration to string and compare as below.

 

Filter(Event, Text(State)="Active")

 

 

View solution in original post

Thanks Perumal,

 

It works fine.

 

Regards,

Szabolcs

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (82,129)