Key Highlights of the Video
- Purpose of the Video: The goal is to show users how to display the last record submission after it is created in Power Apps. This confirmation screen will help users review the details of their submitted check-ins and either confirm or modify the data.
- Building the Confirmation Screen:
- Start by duplicating the main screen to create a new screen dedicated to confirmation. This new screen will display the last record that was submitted.
- Remove any unnecessary components (such as buttons or galleries) to simplify the layout.
- Add a Display Form instead of an Edit Form, which is used for viewing a single record rather than editing or creating new records.
- Connecting to the Data Source:
- Matt connects the Display Form to the data source for student check-ins and check-outs. The data is pulled from this source to show the last submitted record.
- He customizes the form to display only the relevant fields like the teacher's name, check-in date, comments, and location, excluding unnecessary fields such as the check-in identifier.
- Navigating to the Confirmation Screen:
- After submitting a check-in, the user will be navigated to the confirmation screen where they can review the submitted details.
- Matt discusses the formula lastSubmit, which can be used to pull the most recent submission. However, using newForm in conjunction with this formula causes the last submission data to be lost. To resolve this, Matt advises using a collection to store the submission data and display it in the confirmation screen.
- Solution for lastSubmit and New Form Issue:
- Matt initially encounters an issue with the lastSubmit formula not functioning correctly because the form was reset to "new mode" after submission.
- He solves this by removing the newForm formula from the "On Success" property and adjusting the navigation so that the confirmation screen is displayed with the correct record.
- Confirming the Submission:
- A button is added to allow users to confirm that everything looks good on the confirmation screen. Once the user confirms, the app can navigate them back to the main screen and reset the form to "new mode" for the next entry.
Tips for Implementing This in Your Power App
- Use Display Forms for Viewing Records: Unlike Edit Forms, Display Forms are designed to show one record at a time. This is perfect for confirmation screens where you just need to display submitted data.
- Customize Your Fields: Select only the fields that are relevant to your users. For instance, if your app is for student check-ins, display only the check-in date, location, and teacher’s comments rather than internal identifiers.
- Manage Submission Data Effectively: If you want to use the lastSubmit formula to bring in the latest record, ensure that you do not reset the form to "new mode" immediately after submission. This can cause the last submission data to be lost.
- Confirmation Process: Provide users with a confirmation screen to review their submissions. Add a button to allow them to confirm the entry, and reset the form for the next submission.
Conclusion
This tutorial is a valuable resource for Power Apps developers who want to build efficient applications inside Microsoft Teams. By creating a confirmation screen that displays the last submitted record, users can verify their inputs and correct mistakes, improving the overall user experience. Matt Peterson's clear step-by-step guide makes it easy for both beginners and experienced developers to follow along.
Stay tuned for the next video in the series, where Matt will delve into editing records and managing data in more complex scenarios.
Author: Matt Peterson, Trainer at Pragmatic Works
Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Canvass App and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks.