{"id":144,"date":"2017-11-16T02:00:07","date_gmt":"2017-11-16T10:00:07","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-apps\/separate-custom-forms\/"},"modified":"2024-09-24T14:46:50","modified_gmt":"2024-09-24T21:46:50","slug":"separate-custom-forms","status":"publish","type":"power-apps","link":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-apps\/separate-custom-forms\/","title":{"rendered":"SharePoint custom forms: Build separate forms to create, show or edit the list item."},"content":{"rendered":"

We announced the availability of Custom forms for SharePoint<\/a> yesterday and today I wanted to show a simple example on how you can create separate forms to create, show or edit an item.<\/p>\n

For this example, we will start with a simple SharePoint list, which is a custom list used to track service requests.<\/p>\n

<\/p>\n

We can create a custom form for this list by using PowerApps > Customize forms, but the default generated form will use the same form for creating, showing or editing an item. We are going to customize the form further by creating separate forms for the three scenarios.<\/p>\n

Step 1:<\/strong>\u00a0We are going to click again on “Customize” from the default form to launch PowerApps Studio.<\/p>\n

<\/p>\n

Step 2: <\/strong>Once inside PowerApps Studio, We are going to duplicate my FormScreen1<\/strong> twice to create three screens in our app.<\/p>\n

<\/p>\n

<\/p>\n

It is easier to duplicate the screens rather than create them new as it will set the DataSource, Item and OnSuccess properties of the forms correctly.<\/p>\n

Step 3: <\/strong>Let’s rename the screens & forms so they are easier to use in formulas.<\/p>\n

<\/p>\n

Step 4: <\/strong>We now need to set the formulas to show the different forms when actions are taken by the user. We are going to select the SharePointIntegration<\/strong> control and set the formulas to navigate to the screen and set the form in correct mode. We are going to also create a variable “SharePointFormMode” which we will use in Step 5.<\/p>\n

To achieve this, we set the following formulas on SharePointIntegration<\/strong> control:<\/p>\n