Update Polls Easily with Power Apps File Upload Feature
Image Source: Shutterstock.com
Power Apps
Feb 12, 2024 5:00 PM

Update Polls Easily with Power Apps File Upload Feature

by HubSite 365 about David Wyatt

Senior Staff Engineer - Intelligent Automation Developer

External Blog Post
Citizen Developer

Power AppsLearning Selection

Master Power Apps Polling: File Uploads&Updates-Step-by-Step Guide

Key insights

 

 

  • The Power Apps utilizes a 'Polling' API method to fetch flow updates after file uploads, enhancing app responsiveness by not freezing during update checks.

  • Three primary steps in the process include File Upload through a form linked to a SharePoint list, processing the flow where a file is created and iterated over, and App Polling Updates to receive progress statuses.

  • For file uploads, a workaround uses a SharePoint list's 'Attachment' item outside the form, manipulating it to accept files, which are then converted to base64 format for the flow.

  • The flow involves creating the file in SharePoint, using a loop to process table data, and updating a list item to track progress, which the app checks to know if the process is complete.

  • App Polling Updates utilize a timer to periodically check the progress of the file processing through SharePoint fields, using a progress bar for visual representation of the upload status.

Exploring the Integration of Power Apps with SharePoint for Effective File Management

Power Apps offers a sophisticated avenue for managing file uploads and updates, especially when integrated with SharePoint. The process involves utilizing a polling API that allows applications to inquire about the completion of certain tasks, particularly useful in scenarios involving file uploads. This method prevents the application from freezing, offering a smoother user experience. Power Apps takes advantage of SharePoint's list and attachment capabilities to facilitate file uploads, bypassing the lack of a built-in file upload component. Furthermore, the flow processing in SharePoint creates and iterates over files, updating the app regarding the progress. This seamless integration between Power Apps and SharePoint not only simplifies the process of handling files but also enhances the efficiency of data management tasks, making it an invaluable strategy for developers looking to optimize app performance.

In this blog post, David Wyatt shares a guide on using Power Apps to get updates on file uploads through polling. Polling APIs work by continually asking if a task is complete. Wyatt includes additional tips to enhance the process.

The demonstration covers selecting and uploading an excel file and receiving progress updates without freezing the app. There are three main steps: File Upload, Processing Flow, and App Polling Updates.

File Upload in Power Apps doesn't have a straightforward component, but Wyatt shows how to use a form linked to a SharePoint list to find an 'Attachment' item. By adjusting parameters and using a trick to convert file data into base64, the file can be prepared for upload.

  • Selecting and uploading an excel file
  • Processing the file through a flow
  • Receiving updates in Power Apps without app freeze

In the Processing Flow step, Wyatt emphasizes creating a SharePoint list item to track upload progress. This setup allows the app to continue running while the flow processes the upload in the background.

For the App Polling Updates, a timer checks the SharePoint item to determine the percentage of completion. A progress bar visualizes this process, allowing for a user-friendly interface.

Wyatt concludes that this method effectively manages long-running tasks in Power Apps, enabling users to continue using the app while being updated on the task's progress. This approach demonstrates the versatility and efficiency of Power Apps in handling file uploads and processing.

Steps to Implement Polling in Power Apps

The demonstration will cover selecting an Excel file within the app, uploading it to a flow, and receiving progress updates without freezing the app. It involves a few main steps: File Upload, Processing Flow, and App Polling Updates.

  • Select and upload an Excel file in the app.
  • The flow processes each row of the file.
  • The app receives updates on the processing progress.

For file upload, use a form linked to a SharePoint list to find an 'Attachment' item. Then, change certain parameters to accept the file. Subsequently, extract the file data, convert it to base64, and finally trim unnecessary metadata for the flow.

  • Modify the attachment item's parameters for file upload.
  • Convert file to base64 format and trim metadata.
  • Pass file data to a flow returning a SharePoint list item ID.

The processing flow is straightforward, involving file creation, locating the table, and iterating over it. Lastly, for app polling updates, employ a timer to check the flow's progress in SharePoint, displaying the completion percentage through a progress bar.

  • Create a file in SharePoint and use it to track progress.
  • Utilize a timer in the app to fetch updates from SharePoint.
  • Display progress using a new progress bar feature.


Read the full article How to - Power Apps Getting Polling Update from File Upload

 

Power Apps - Update Polls Easily with Power Apps File Upload Feature

People also ask

How do I add an upload file to power app?

To achieve this, commence by navigating to SharePoint within your search parameters. Once there, proceed to identify and select the relevant options under SharePoint to facilitate the file upload process to your Power App.

How do I upload a video to PowerApps?

Although the functionality to upload a video might not be directly available in your app at the moment, you can still proceed by attempting to upload the video files. This process will allow you to evaluate how the uploaded content appears and functions within your PowerApp.

 

Keywords

Power Apps polling update, Power Apps file upload, update Power Apps from file, Power Apps file upload polling, how to update Power Apps, file upload in Power Apps, Power Apps polling technique, managing file uploads Power Apps, Power Apps update technique, automate Power Apps polling