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?