cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mcorning
Responsive Resident
Responsive Resident

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
v-micsh-msft
Community Support
Community Support

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.

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
Responsive Resident
Responsive Resident

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
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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (54,509)