Building SharePoint List Forms with PowerApps is starting to roll out. As you customize your forms, you may get to a point where you want to delete one of them. When you customize a SharePoint List Form in this manner, the PowerApp itself doesn’t show up in your list of apps so you might be wondering how to delete the form itself. It’s not too had, once you know where to look.
Before you go an delete your form, keep in mind that you can roll back to any previously saved version using the version history. Just click on File, Save, and then See All Versions.
Just click the Restore button if you need to go back a version. If you have the PowerApp open in an editor in another browser tab, you’ll need to close that first.
If you really need to do delete the PowerApp though, you can do that from the List Settings on the SharePoint list itself. Click on the Form Settings link. This is where you used to go to turn on and off InfoPath back in the day. First, select Use the default SharePoint form.
Next, select Delete the custom form.
Click OK on the confirmation and the custom PowerApps form for your SharePoint list will be gone. You can now choose PowerApps –> Customize forms again to start over with a new form in PowerApps.
I’ve been building forms for a number of business processes lately using PowerApps and some of my tenants recently received the ability to customize forms in SharePoint lists using PowerApps. One common scenario is that you might want to show or hide different fields depending on whether the user is creating a new item or editing an existing one. I tried a number of approaches while experimenting with the visible field. It wasn’t quite obvious to me at first, so after watching the following video that Chris Webb sent me a link for, I figured it out.
For our scenario, we have a simple travel request form. The requester will fill out fields on where they are going. The approver will edit the form and fill in comments and mark it as approved. The requester shouldn’t see these fields. In this example, we could actually use Approval Flows and what not, but for this example we are keeping it simple. Let’s start by looking at our default form.
Start by selecting the field you want to hide and then click on the Visible property.
Now, set the value equal to the following formula.
If(SharePointForm1.Mode = FormMode.New, false, true)
This hides the field when the form is in new item mode and shows it for view and edit. You can customize this to your needs for other views as well. You can preview what the form looks like in different modes now by clicking on SharePointForm1 and then changing the Default mode property between New and Edit. For example, here is what my New form looks like now.
Save and Publish your form and then you can try it from within SharePoint. Now, when I click on the New button, the other fields are hidden.
When I edit an existing item, we see the fields that we hid on the new form.
Like many things in PowerApps, hiding fields is pretty simple once you know the right formula. It took me a bit to figure this out because I think I was approaching this more from my developer background. When I start to think about the old Excel formulas I used to use, it actually makes a lot of sense.