Hello,
I have just finished reviewing the video "PowerApps Repeating Tables Like InfoPath Part 3 - Inline editing" by @ShaneYoung
and whilst I've managed to get the functions working that are required for my app, when I delete an item in my collection gallery, the SharePoint list item it originally created is not deleted.
Once a form item is completed in my app, the user then selects a 'Create PDF' button, which via Power Automate, grabs the main list itemID and associated items in the collection list and merges this into a word document, before creating PDF.
We don't want deleted collection items that still remain in the SharePoint list to populate the word document.
The OnSelect property of my main EditForm save button is set to:
SubmitForm(SelectedItem_form);
Set(varFormMode,"Saved");
If(varNewItem = true, Navigate(HomeScreen,ScreenTransition.Fade); Set(varNewItem,false));The OnSuccess of my SelectedItem_form (editForm) control is set to:
(ForAll(colDocData, If(!IsBlank(Argument & Evidence), Patch(colDocDataSP, Defaults(colDocDataSP), {spSubtopic: Subtopic, spSubtopicBreakdown: SubtopicBreakdown, spArgument: Argument, spEvidence: Evidence, DocumentDataID: SelectedItem_form.LastSubmit.ID}))))The OnSelect of my collection Save icon is set to:
Update(colDocData, ThisItem, {Subtopic: Subtopic_dd.Selected.Value, SubtopicBreakdown: SubtopicBreakdown_dd.Selected.Value, Argument: Argument_input.Text, Evidence: Evidence_input.Text, ShowSaveButtons: false}); If(EditPressed, false, Collect(colDocData, {ShowSaveButtons: true}));UpdateContext({EditPressed: false});
Set(NeedsSave, false)and the OnSelect of my Delete icon is set to:
Remove(colDocData,ThisItem);Set(NeedsSave, false)
I need to do something with the Delete icon so that it not only deletes the collection line/record in the app but also deletes the item it originally created in the colDocDataSP SharePoint list.
Any pointers would be appreciated!


Report
All responses (
Answers (