Hi there,
I'm trying to figure out how to delete list entries from a sharepoint list once a form containing those entries has been submitted in Powerapps.
In my current set up, the list entries are selected in a combobox and the submit button starts a patch function to populate a different sharepoint list.
Please see code below:
Set(
Success,
Patch(
'Table Booking',
Defaults('Table Booking'),
{
Title: txtUser.Text,
Location: ddLocation.Selected.Result,
GuestNames: Concat(
cbTableGuests.SelectedItems,
Name & "; "
),
Table_x0020_Guests: Concat(
cbTableGuests.SelectedItems,
Email & "; "
)
}
);
);
SubmitForm(Form6);
If(
!IsBlank(Success),
Notify(
"Guests submitted!",
NotificationType.Success
)
);
Solved! Go to Solution.
I figured it out in the end!
It turned out to be pretty simple:
Remove(
Unassigned,
cbTableGuests.SelectedItems,
All
);
I am not entirely clear on what you want to delete.
You are showing a patch and a submit form. I assume they are to two different datasources.
Can you explain what it is that you want to delete?
@vtom1994 - It sounds like this is your workflow.
1. Select one or more items from SP List 1
2. Create a new entry on SP list 2 with a list of the users selected in Step 2
3. Remove users from list 1
I think what you would have to do is have it as an intermediary step. What I would do is something like this
ClearCollect(
ToRemove,
cbTableGuests.SelectedItems
);
RemoveIf(TableGuests, ID in ToRemove.ID)
I figured it out in the end!
It turned out to be pretty simple:
Remove(
Unassigned,
cbTableGuests.SelectedItems,
All
);
User | Count |
---|---|
247 | |
105 | |
82 | |
50 | |
43 |