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

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
Highlighted
Super User II
Super User II

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
Highlighted
Super User II
Super User II

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

Highlighted

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

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,926)