Introduction
PowerApps is an enterprise service that lets you connect, create, and share business apps with your team in minutes, using any device. You can create a PowerApps for an existing list in SharePoint Online.
Let's get started on how we can create a fully functional PowerApps based on a standalone application. I am going the cover all of the steps throughout multiple articles.
- Design Home Page Screen
- Navigation among screen
- Item List View Screen
- Item Detail View Screen (Going to cover in this article)
- Item Detail Edit Screen (Going to cover in this article)
- New Item Screen
- Search Content
- Cascade Lookup Control
- Validation based on formula
- Hide and Show Control based on formula
In this article, I am going to talk about the below points:
- Navigation among screens.
- Item detail view screen
- Item detail edit screen.
Prerequisites
Since I already explained the below points in detail, kindly refer to this
article, where I explain the below points:
- Build a Home screen
- Add a List view screen
- Add a connection to SharePoint online.
- Add navigation among the screens.
Let's get started with next steps,
Step 1 - Add a Display screen with SPO list connection.
- Select and click to add a new screen
- Rename the screen "Flight Display Screen"
- Select and click to add a display form.
- FormViewer1 will appear in the tree view and a blank canvas without datasource connection.
- Select the form view canvas and click "Connect to Data"
- Select the data source from the Form View Property section.
Step 2 - Design Display screen
- Select DataSource as list name i.e. Flight Details.
- Set the Column Layout (i.e. 2) and Layout as vertical.
- Add a Label for the heading of the screen and change the text to "Flight Detail View Screen".
- Add a Home icon from the Icons section to navigate to the home screen.
- Add an Edit icon from the Icons section to navigate to the Edit Screen.
- Add the Close icon from the Icons section to navigate to the previous screen.
Step 3 - Add Navigation for Home Icon
Select the Home icon and write a function, i.e:
On a click of the home icon, it will navigate to the home screen.
Step 4 - Add Navigation for Edit Icon
Select the Edit icon and it will write a function, i.e:
- Navigate(FlightEditScreen)
On a click of the edit icon, it will navigate to the flight edit screen
Step 5 - Populate View Screen on Item Selection
- Select FormView
- Set the function for item property i.e. "DataTable1.Selected". This data table exists in the list view form. View get the selected item based on this property.
- Once the item property is set, the selected item value appears in the view screen.
Step 5 - Add and Populate Edit Screen on Item Selection
- Select and click to add a new screen
- Rename the new screen "Flight Edit Screen"
- Add an Edit from the Form Section
- Add a data source from Form Property section (i.e. List Name)
- Select a Form and set the item property to "DataTable1.Selected.
- As the item property is set, select the item value to start appearing in the Edit screen.
Step 6 - Add a Save icon functionality on the Edit Screen
Select the save icon and write a function on On Select:
- SubmitForm(Form1);Navigate(FlightListView);
It will save the data to SharePoint Online List and redirect the user to the list view screen. The user will get an updated record on the list view screen.
Step 7 - Define navigation from List View Screen
Select the Flight List View screen, followed by DataTable1
Select the first column (i.e. Flight Name)
On Select property, write the below function to navigate to the Flight Display Screen
- Navigate(FlightDisplayScreen)
Step 8 - Save , Publish and Test
- Save the application, click file -> Save.
- Click save button to save the application
- Click the Publish button to publish the application and make it available to other intended audiences.
Press F5 or click the published version of the app to run.
The power apps home screen will execute like this and select for the click first image.
- List View Screen | Select the item to navigate to the item detail view screen:
- Item Detail List View Screen | Click the Edit icon to navigate to the exit screen
I hope that you enjoyed and learned something new in this article. Thanks for reading and stay tuned for the next article.