cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mcorning
Level 8

Filter an entity using Picklist field

  1. I have a new entity, Interview, that includes a Picklist field, IncidentType.
  2. I need to filter the entity for a given Picklist field value.
  3. Filter(Interview, IncidentType) returns nothing in a Gallery, DataTable, or an EntityFormList
  4. If i add a text field to Interview, then set record values according to the Picklist (e.g., Hiker has "Hiker" Key field), then filtering on the Key field works fine. So i'd be better off dropping the Picklist and just typing in "Hiker" (or the thirty other values) instead

 

in scenarios like mine, do i need to use a related table (with an IncidentType text field) instead of a picklist? this way the filter is looking at a text field value in the related table.

3 REPLIES 3
Community Support Team
Community Support Team

Re: Filter an entity using Picklist field

Hi @mcorning,

 

Would you please share more information about the IncidentType Picklists?

 

For filter function to work, the formula part should be result in a boolean value.

For example, 

Filter(Interview, IncidentType="Value")

This should work.

For option 4 you mentioned, I am a little confused about it. Would it be convenient for you to share any examples wihtin a formula?

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
mcorning
Level 8

Re: Filter an entity using Picklist field

Picklist-based Filter issues.png

 

As you can see above, the Filter expression evaluates a boolean predicate, but renders no records. with an EntityForm, you can see that entering an "H" does not filter the list of IncidentTypes (take my word that i chose IncidentType from the list).

 

Also, note that Distinct(Interview,IncidentType) does return the list of two options i expect.

 

mcorning
Level 8

Re: Filter an entity using Picklist field

As for item 4, i've added other examples to include the Key field (type string).

 

Also, i have added a DataTable because it behaves the same way as the other controls. BTW, did you guys notice that you cannot copy and paste a DataTable nor can you nudge them with cursor keys? Likewise with EntityForms.

 

I've added one unexpected phenom, as well: the two entityforms are identical; the only difference is that i type an "H" in the top one. This converts the strange string values for Key listed in the bottom form to the correct string values i expected in the first place.

 

Would you like me to ship my Picklist and Interview entity table to you?

 

Picklist-based Filter issues 2.png

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 235 members 4,949 guests
Please welcome our newest community members: