So now we can edit a selected record, but we need a mechanism to persist any changes we have made – i.e. a save button. From the left, click the + icon and select Button.

Drag the button to a suitable place on our canvas. Rename as btnSubmit.

Select the button and view its properties on the right of the canvas. Change the Text property to Save.

Next, we have to define what happens when we click the Save button. Select our button, and set the OnSelect property in the formula bar to be as follows:

SubmitForm(frmInspection);
Refresh(Services);

The first action will submit changes to the data source, and the second will refresh the dataset in use by the app. Click on the Publish button in the top right of our app to view it running:

Again, we’ll worry about styling in another post as there’s a lot of improvements we can make here. Note the updates to our selected record. If we click the Save button, we can see the updates in Dataverse also.

Pages: 1 2 3 4 5

2 responses to “Building Canvas Apps Part 2: The Basics of Galleries and Forms”

  1. Building Canvas Apps Part 3: Custom Forms, Containers and Patching – Power Platform Pete Avatar

    […] our last post we built a very simple canvas app using Forms, Galleries and our Service table. Forms are one of […]

    Like

  2. Working with APIs Part 1: Creating a test API – Power Platform Pete Avatar

    […] of the third post, we had built an app that was more visually appearing that it was in the second post, but we had issues when the size of the datasets increased. In the fourth post, we introduced the […]

    Like

Leave a comment