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

Filter not getting all records - CDS/Dataverse

I have an entity called "Customer Rating Totals" with 1500+ records in Dataverse.

 

Of those 1500, 950 have a status of "Final". When I execute this code:

 

ClearCollect(FinalCustomerRatingCol, Filter('Customer Rating Totals', "Final" in 'Score Card Status'))

 

the collection "FinalCustomerRatingCol" only has 290 records in it. I don't understand why...

 

'Score Card Status' is a Choice field.

 

The Powerapps setting for data row limit is set at 500 (not sure if that has any impact here as the above code is delegable).

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
JT_Corrin
Helper II
Helper II

Turns out I was just being an idiot, as usual.

 

This is what I was doing:

ClearCollect(FinalCustomerRatingCol, Filter('Customer Rating Totals', "Final" in 'Score Card Status'))

 

When really I should have been doing:

ClearCollect(FinalCustomerRatingCol, Filter('Customer Rating Totals', 'Score Card Status' = ScoreCardStatus.Final))

 

I was confusing my column name with the actual Choices.

 

Thanks to @Drrickryp for taking the time - talking it through always helps.

View solution in original post

6 REPLIES 6
Drrickryp
Super User
Super User

@JT_Corrin 

A quick solution is to create a view in dataverse and filter it on status. You can then use the view in your formulas as needed.

Thanks for the workaround @Drrickryp - I've not worked with views in that way before and would much rather get to the route of my issue before trying your suggestion.

 

I guess I'll open a ticket.

Drrickryp
Super User
Super User

@JT_Corrin 

Before you submit a ticket, as an experiment set your data row limit to 1. If your formulas are truly delegatable, it should make no difference in the result.

thanks for the suggestion, @Drrickryp. Turns out the "in" in my filter is none delegable. 

 

My question then becomes how can I filter on a choice column? 

 

I've tried wrapping it in a text function: Text('Score Card Status') = "Final"

 

...but that doesn't work.

 

Drrickryp
Super User
Super User

@JT_Corrin 

On a new screen, put a dropdown on the screen and a galley.

Set the items property of the dropdown ["Final","etc"] where etc are the other choices. Make your items property of the gallery 

Filter('Customer Rating Totals', 'Score Card Status'.Value=Dropdown1.Selected.Value)

 

JT_Corrin
Helper II
Helper II

Turns out I was just being an idiot, as usual.

 

This is what I was doing:

ClearCollect(FinalCustomerRatingCol, Filter('Customer Rating Totals', "Final" in 'Score Card Status'))

 

When really I should have been doing:

ClearCollect(FinalCustomerRatingCol, Filter('Customer Rating Totals', 'Score Card Status' = ScoreCardStatus.Final))

 

I was confusing my column name with the actual Choices.

 

Thanks to @Drrickryp for taking the time - talking it through always helps.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Users online (1,535)