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

Exclude multiple values from the same column in a collection

Hi everyone,

 

I want to exclude specific values in a column from a collection. In the example below I want to exclude any records with a status of “02. Rejected” and “11. Closed”.

 

Capture.PNG

 

I am aware it is possible to do this by creating a separate collection of the values I want to exclude, and then use that collection as the filter parameter:

 

ClearCollect(collectExcludedOptions, ["02. Rejected","11. Closed"]);

ClearCollect(FilteredDataSource, Filter(DataSource,Not(Validation_Status in collectExcludedOptions.Value)))

 

Is there a simpler method? E.g. ClearCollect(FilteredDataSource, Filter(DataSource, Validation_Status NOT {“02. Rejected”, “11. Closed})))

 

best regards,

AmiKhan

2 REPLIES 2
Jacky_Shen
Resolver IV
Resolver IV

Hi @Amik ,

 

My preference would be using a full collection and apply filter in your gallery. A full collection makes sure you have all the information, but you can process the data using filter in any of your screen, this will save your time and reduce your confusion.

imranamikhan
Advocate I
Advocate I

In this context this is not option, because users do not need to see any records with those status types On Start of the app

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,594)