cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ACPBSCi
Helper III
Helper III

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
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
GarethPrisk
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

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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

Top Solution Authors
Top Kudoed Authors
Users online (80,502)