0

Is it possible to customise only NewForm of the Modern SharePoint List using PowerApps and rest of the forms(Edit and View) will use the default forms? I am using SharePoint Online.

3

Reference Here

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.

Step 1: We are going to click again on "Customize" from the default form to launch PowerApps Studio.

Step 2: Once inside PowerApps Studio, We are going to duplicate my FormScreen1 twice to create three screens in our app.

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.

Step 3: Let's rename the screens & forms so they are easier to use in formulas.

Step 4: 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 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.

To achieve this, we set the following formulas on SharePointIntegration control:

OnNew – Set(SharePointFormMode, "CreateForm"); NewForm(CreateItemForm); Navigate(CreateScreen, ScreenTransition.None)

OnEdit – Set(SharePointFormMode, "EditForm"); EditForm(EditItemForm); Navigate(EditScreen, ScreenTransition.None)

OnView – Set(SharePointFormMode, "ShowForm"); ViewForm(ShowItemForm); Navigate(ShowScreen, ScreenTransition.None)

Step 5: To handle the form submission and reset correctly, we update the formula for OnSave & OnCancel. We use the variable created in Step 4 to decide which form to submit or reset.

We set the following formulas on SharePointIntegration control:

OnSave – If(SharePointFormMode="CreateForm", SubmitForm(CreateItemForm), If(SharePointFormMode="EditForm", SubmitForm(EditItemForm)))

OnCancel – If(SharePointFormMode="CreateForm", ResetForm(CreateItemForm), If(SharePointFormMode="EditForm", ResetForm(EditItemForm)))

Step 6: We can now customize each form differently as we want. We can change the number of fields shown on each form or add helpful text on each screen.

Step 7: To finish, we Save and Publish the form, then go back to our SharePoint list and try the different scenarios to see three different forms now:

With those 7 steps, we now have different forms to create, show or edit the items of our list.

As a next step, learn more about custom forms or understand how the integration works. Also, engage with us and other users in PowerApps community.

  • Thanks of the reply. But Is there any way I can use Powerapps form for New item creation and SharePoint default forms for edit and view? – Sudip Ranjan Sil Jan 21 at 16:21
  • I better understood your question now, I will say no, we cant. But we can always create custom buttons and with JSOM/Rest API we will Get ListItems or Edit them. – Ahmed Bouchaala Jan 21 at 16:34
0

As an alternative, you could create a power app that submits to the list, and provide users a link to the app (or a SharePoint page that has the app) for creating items. This doesn't do what you ask, as the new button on the list will still use the oob forms, but it does provide a way to have a power app to submit new items, while having the oob forms for editing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.