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

Re: Delete row in repeating table on submit

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

Re: Delete row in repeating table on submit

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
Helper II
Helper II

Re: Delete row in repeating table on submit

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
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,718)