Overview
In this article, we will see how we can edit multiple items in a SharePoint list one by one on the success of form submission. In scenarios where you don't want your users to always select an item to edit from a Gallery, this solution is best suited. In scenarios where you have a set of records to be edited and you make use of a Gallery control, this solution is for you. I will give my best in giving you a suitable example in explanation to these scenarios. Let' see below step by step how we can achieve this.
Scenario
A Team Lead who logs in to the Power Apps application has to see the work items assigned to his team and should be able to edit the worklist items. For this, we need the following,
- Data Source - Work progress tracker SharePoint List
- Power Apps - Work progress tracker application
Creating Work progress tracker list
Step 1
Open Lists from the O365 suite,
Step 2
Click on New List.
Step 3
Select the predefined template Work on progress tracker list,
Step 4
Pre-fill the list with sample data,
Design Work Progress Tracker application
Step 1
Create a new Tablet canvas app from scratch
here.
Step 2
Make a connection to Work Progress Tracker list in canvas app,
Step 3
You can design the controls on the screen as follows: Where Work Item 1 is selected in the edit below screenshot.
#1 Set Items property of Gallery control,
#2 Function to set a variable on selected gallery item: OnSelect property
#3 User name Label: Text property
#4 Add an Edit form control with data source 'Work Progress Tracker' list.
#5 Set item property of the Edit form to,
#6 Set OnSuccess property of the form to,
- Set(
- var,
- First(
- SortByColumns(
- Filter(
- 'Work progress tracker',
- ID > var.ID
- ),
- "ID",
- Ascending
- )
- )
- )
#7 Set the Completed Icon: OnSelect property,
Output
Go to my
GitHub repository to watch the output.
Summary
We have seen the creation of the Microsoft Lists Work progress tracker from the existing template and designed a simple gallery and form in Power Apps to edit the list items one by one.