September 20, 2024 How to use Single form for both Edit & New in Canvas app Canvas AppPower Apps By Vinay Kumar Kudumula 0 Comments Canvas app:In this blog , I will show how to use single form for both edit & New in canvas app power apps. Step 1:First open your Canvas appCreate a new screen Add gallery and connect it to your data source like sharepoint , dataverse , excel etc,. Add two buttons and rename them as New and Edit Add another screen and add edit form .Connect it to the data source . Now , Onselect property of Edit button write the code :Set(varSelectedRecord, ThisItem);Navigate(Screen3); where ,Screen3 = screen name Now , Onselect property of New button write the code :Navigate(Screen3);NewForm(Form2) In Form , select Defaultmode property and write as shown below:If(IsBlank(varSelectedRecord),FormMode.New,FormMode.Edit) Add a button in form page for saving the changes and name it as submit and Write code in Onselect property of that button as shown below:SubmitForm(Form2);Navigate(Screen2) Now, it is working as expected . For any Help or Queries Contact us on info@crmonce.com or +91 8096556344