cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JR-BejeweledOne
Super User
Super User

Removing record from collection

In my app I have a collection that is built from a couple different scenarios.  This part all works wonderfully.

 

Because part of this involves an InfoPath style 'repeating table', I have to do a collect at the end of the build to provide a blank row, for additional entries to be added.

 

The user has these options:

  1. Select one or both items in a dropdown (currently a combobox so it shows which items were selected) and then additionally select individual items
  2. Select individual items only

If they are choosing to use option #1, the process involves using collect on the collection to add a blank row so they can continue with individual item selection if they desire.

 

Because it's an either or both option, I need to be able to process the collect as soon as they choose one of the options and then remove that first blank row if they also choose the second item as the process will also add a second blank row once that selection has been made.

 

This is the current formula, where the highlighted item is not working.  The formula works except for that part.

 

RemoveBlank.png

 

This is the result of the above formula if both options are selected, you can see the dual blank rows that are added as the result of the final collect.

 

CombinedPatch.png

 

However if I add this to a button, it works great:

 

Remove(Markets, First(Filter(Markets, IsBlank(Region))))

 

 

 

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @JR-BejeweledOne ,

If you want to remove anything with a blank Region, try

RemoveIf(
   Markets,
   IsBlank(Region)
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

1 REPLY 1
WarrenBelz
Super User
Super User

Hi @JR-BejeweledOne ,

If you want to remove anything with a blank Region, try

RemoveIf(
   Markets,
   IsBlank(Region)
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

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.

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,015)