Citizen Developer
Timespan
explore our new search
Optimize Data Transfer in Power Apps Canvas Without Connectors
Image Source: Shutterstock.com
Power Apps
Sep 25, 2023 8:27 PM

Optimize Data Transfer in Power Apps Canvas Without Connectors

by HubSite 365 about Terho Antila [MVP]

Low-Code Center of Excellence Lead at Fortum | Microsoft MVP

Citizen DeveloperPower AppsM365 Hot News

Master the art of data transfer in Power Apps without utilizing a connector! Explore innovative solutions from a seasoned Microsoft expert.

Communication in Power Apps Without a Connector: An Experiment

The author, Terho Antila [MVP], takes an unconventional path to explore utilizing Microsoft Power Apps in an innovative way. He's endeavored to make it possible to send and receive data within a Power Apps Canvas App without the aid of a connector.

The inception of this experiment came from working on a 5-star rating feature in Planner Gantt Chart App. Trapped in the thrill of a novel concept, Antila decided to pause his work and delve into the radical idea of connectorless data transfer in Canvas App.

The fundamental notion behind utilizing connectors is to facilitate data transfers between an app and backend APIs. Yet Antila asserts that he's attained this ability without any connector in-place. The author initiates the experiment with two test subjects, John and Jane, who engage in a WhatsApp-like conversation within their separate Power Platform environments.

When Jane composes a new message and hits 'Send', the dialog gets redirected to an Azure Function App endpoint; storing the message in a Storage Table. The canvas app then frequently polls this table to fetch the latest exchanges. This setup eliminates the need for a custom connector or Power Automate flow. For more information on Power Apps, click here.

Building Communication without Connectors

Underlying this entire experiment is an HTML text control integrated with a single img tag. This tag's src attribute is linked to the function endpoint which returns an image with alternating height. This experiment uses this height property to decipher the characters received from the function.

Embedding messages in the image URL path sends new messages to the function endpoint. This experimental approach includes three main parts: a Canvas component handling communication and image height interpretation, a Canvas app integrating the component and allowing the sending and viewing of messages, and finally, Azure's function and storage table to manage receiving and transmitting images.

The Canvas Component

Managing communication with the backend function endpoint is the responsibility of the Canvas component. Antila names his Canvas component 'Communicator' that includes controls like Timer1 and htmlImg for the communication.

The code within Timer1 utilizes the HTML text control's height data to execute corresponding actions. This includes reading new messages, receipt of complete messages, or updating the current message based on the height of the image. The HTML Text Control with the img tag is the "secret" ingredient of the experiment, as it passes all necessary data to the function's endpoint as part of the URL path.

"Communicator" exposes various custom properties for ease of use within the Canvas app.

The Canvas App

Antila explains the application as consisting of three areas: the Communicator component, a form for new messages, and a gallery for viewing them. Remarkably, the functions of the app lack any connectors! Are we then seeing true connectorless communication?

Azure Function

Another key component of the experiment is the function endpoint, which receives embedded data from URLs and returns a Bitmap of a desired height and width 1. The details of the specific code are shared in the blog, but high-level actions include handling both the instance of receiving a new message and the end of a message. The function code works with certain inputs, converting characters received into image height values and returning these to the client.

Despite achieving the goal of the experiment, Antila acknowledges the data transfer rate is poor, making it an unviable substitute for actual connectors in data-centric applications. However, scenarios wherein there is limited data exchange between the app, users, and backend systems may find this a useful technique. The author also encourages enhancing the Communicator component and Azure function code for a potential mini message broker functionality.

Read the full article Sending and receiving data in your Power Apps canvas app without ANY connector!

Power Apps - Optimize Data Transfer in Power Apps Canvas Without Connectors

Learn about Sending and receiving data in your Power Apps canvas app without ANY connector!

The [BEGIN TEXT] focuses on a unique way to transfer data using Power Apps without using any connector. The fascinating aspect of this approach is its novelty and the fact that is strays from traditional methods.

To understand deeper, here are steps you can undertake:

  • Read extensively about Power Apps on the official Microsoft documentation. This will give you a strong foundation and aid your understanding of the innovations discussed in the text.
  • Enroll in Microsoft's Power Apps training to get a hands-on experience. This will equip you with the practical knowledge to innovate within the platform.
  • Given the integration with Azure in this example, consider completing related courses, such as the Microsoft Azure Developer Associate training. This will provide a broader understanding of the infrastructure supporting the App.

The text mentions that the data transfer was done via a canvas app. You can explore Microsoft's official Canvas app tutorials and forums. This will give you a practical understanding of how the system works.

Lastly, explore Azure Function Apps and Storage Tables, as they play an essential role in this data transfer protocol. Microsoft offers several training and certification courses that can clarify how it operates and how to use these technologies.

What's interesting in this text is the use of the HTML text control for communication with the endpoint, particularly using a single img tag and the function's ability to control the height of the HTML text control. With that in mind, get familiar with HTML and HTTP protocols, fundamental elements that work in tandem with the Power Apps platform.

Most importantly, continuously experiment and test different features within Power Apps. Remember that it's okay to "think outside the box" as that's where innovation often emerges.

Two sections in the text, 'Canvas Component' and 'Azure Function,' are particularly noteworthy. By understanding these areas, one can recreate the experiment described in the text, sending and receiving data with a canvas app without using any connector.

Remember, this is purely an experiment and, as mentioned in the article, may not be suitable for production or comply with Microsoft's terms and conditions. But, from an academic standpoint, this is a fantastic experiment that pushes the boundaries of what's possible with Power Apps, Azure Functions, and Canvas Apps.

Overall, by doing all of the above, one should have a solid understanding of the text and the unique use case it presents. Consequently, there should be no outstanding questions on the topic.

More links on about Sending and receiving data in your Power Apps canvas app without ANY connector!

Sending and receiving data in your Power Apps canvas app ...
What I am using to make this all work without connectors, is an HTML text control with a single img tag as its contents. The img tag's src ...
Manage connections in canvas apps - Power Apps
Dec 15, 2022 — Add, delete, and update connections from canvas apps to data sources such as SharePoint, SQL Server, and OneDrive for Business.
Share resources used by canvas apps - Power Apps
Dec 15, 2022 — To do this, go to make.powerapps.com and select Data -> Connections from left navigation. Then select the required connection. If the Share ...

Keywords

Power Apps canvas app, send receive data, no connector, data transfer Power Apps, Power Apps without connector, Power Apps data management, unconnected Power Apps, handle data Power Apps, connector-free Power Apps, Power Apps data techniques