cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ACPBSCi
Resolver I
Resolver I

Delete row in repeating table on submit

Here's one for you. I have an app that's part form and part repeating table. Table works like a champ. Using the Reset feature to clear my forms works like a champ. However, the data that I enter into the fields of my repeating table does not clear:

1.PNG

I can do a lot of coding to clear those fields, but will that take away the rows, too? The code in the X for each row is:

RemoveIf(UserCollection,UserItemNumber=ThisItem.UserItemNumber)

So if I want all the rows to go away when I click "Save", I would need to

  1. keep a count of all the rows that were added,
  2. write a formula that removes the same number of rows

What would that formula look like? And how would I count the rows?

1 ACCEPTED SOLUTION

Accepted Solutions
GarethPrisk
Resident Rockstar
Resident Rockstar

RemoveIf can match and remove multiple rows, if the filter criteria works.

To clear the whole collection (all rows), use the Clear function Clear(UserCollection);

To count the rows beforehand, just CountRows(UserCollection) as a separate function before clearing.

View solution in original post

2 REPLIES 2
GarethPrisk
Resident Rockstar
Resident Rockstar

RemoveIf can match and remove multiple rows, if the filter criteria works.

To clear the whole collection (all rows), use the Clear function Clear(UserCollection);

To count the rows beforehand, just CountRows(UserCollection) as a separate function before clearing.

View solution in original post

Clear(Collection) worked! That's good to know. I was afraid having a repeating table would make it so complicated. I was definitely overthinking it. Thank you so much @GarethPrisk!!! That was the last hurdle on the first app I've ever built.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

secondImage

Power Apps Community Call

Please join us on Wednesday, October 20th, at 8a PDT. Come and learn from our amazing speakers!

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.

Top Solution Authors
Users online (2,741)