web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : jcEsTwb/SbfK9iZpbcuJX9
Power Apps - Building Power Apps
Unanswered

Remove button doesn't work properly

Like (1) ShareShare
ReportReport
Posted on 21 Aug 2024 15:41:45 by 2
Hello,
 
I'm new in PowerApps, and I'm creating a sort of a form to send multiples rows to Sharepoint at once.
 
How should it work:
 
1- Job Title and Squad name are informed. Then inform the number of rows this job will need, click the buttom and it generate the informed number of rows in a gallery.
** Thats the formula for this buttom ("qtd1" is the text box where the number of rows is informed):  ForAll(Sequence(Value(qtd1.Text)); Collect(Base2; {TĂ­tulo: DataCardValue1.Text; Squad: DataCardValue4.Selected; Sla:"" }))
 
2- With all rows created, there will be some other fiels to fill on each row, and after everything is filled, click on another button and everything is sent to Sharepoint.
** Formula for the "Send to Sharepoint" button: 
ForAll(Gallery3.AllItems; Patch('Teste Peças'; {Título:Título; Squad:Squad; Sla:TextInput2.Text}));;Clear(Base2)
 
Until here everything works perfectly.
 
The problem starts when I trie to add a delete row button on the gallery, in case there are more rows than actually needed.
 
I tired the basic formula in the delete icon: Remove(Base2; ThisItem)
But as the generated rows are identic, it deletes the first row always, not the one I actually clicked.
 
Then I tried creating a number sequence to each row in the gallery. The sequence works, but then the remove formula on the delete Icon stop working.
ForAll(Sequence(CountRows(Base2)); Patch(Last(FirstN(Base2; Value)); {RowN: Value}))
 
 
Is there a way to make this remove function work, deleting the specific row in witch I clicked?
I have the same question (0)
  • WarrenBelz Profile Picture
    151,686 Most Valuable Professional on 21 Aug 2024 at 22:38:42
    Remove button doesn't work properly
    Is there a field in the row with a unique value as an identifier, if so
    RemoveIf(
       Base2; 
       FieldName = ThisItem.FieldName
    )
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)     Visit my blog Practical Power Apps    Buy me a coffee

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 629 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 397 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 232 Moderator

Last 30 days Overall leaderboard