Power Community

Power Community

Power Platform Community

 

Automatically create a Power App from a REST API

Chris Baldwin, Principal Product Manager, Power Apps Studio, Wednesday, August 17, 2022 You’ve deployed a REST API for your new service, and you’ve created a custom connector so that the Power Platform can work with it. Now what? We are excited to announce a new Power Platform CLI command that will create a fully functional canvas Power App that can be used to explore and validate your service with Power Apps. All the controls and Power Fx formulas needed to run the app are generated automatically. This means that for fusion teams, the app can then be handed off to a low-code maker for further customizations in Studio. Along with the recently announced features that facilitate the creation of apps from an image file or a Figma design, this is yet another way that we are making it easier than ever to get started with Power Apps. The generated app will feature a screen for each POST and GET action defined in the custom connector and will have controls on each screen that are appropriate to the types of input and output that are defined by the actions. For example, if the custom connector’s action specifies a list of valid input values, this will be represented by a dropdown control in the app. As another example, if the input type is defined as an array of strings, the appropriate controls will be generated to let the user populate the elements of the array. Underlying each screen will be auto-generated Power Fx formulas that handle the interaction with the custom connector. This feature is surfaced to users as the Power Platform CLI command canvas create. To get started, download and install the Power Platform CLI. You’ll need at least version 1.17.4. More information is available in the Microsoft Power Platform CLI documentation. Using the canvas create command, specify a custom connector within a solution and an output path for the new .msapp file on your local machine: Once imported into Studio, here is what the app generated from the above custom connector looks like. This app has several GET and POST actions, each of which are represented by a screen. You can navigate to one of the actions and interact directly with the API. This example shows the output returned from a basic GET request, displayed in a data table within the app: We’d love to hear your feedback on this feature and to learn about how you plan to use it.  As always, your input will directly influence the direction of this feature in future releases.  Join the Power Apps Community forum to share your thoughts and feedback.

Power BI paves the way for smooth Azure Analysis Services migrations

Power BI innovation never stops. For several years in a row now, we are positioned as a leader in the 2021 Gartner Magic Quadrant for Analytics and Business Intelligence Platforms, furthest to the right for completeness of vision and...

On-premises data gateway August 2022 update is now available

We are happy to announce that we have just released the August update for the on-premises data gateway (version 3000.138.3). This update brings the on-premises data gateway up to date with the August release of Power BI Desktop. ...

Power Fx: Error handling graduates to preview

We are thrilled to announce that the long-time experimental feature Formula-level error handling has moved forward to preview. As a result, you and your end users will enjoy higher reliability and more transparency about what is happening in your apps. It’s a huge step. Adding error handling to an existing language turned out to be a very tall order, touching almost everything, from data types, to functions, to the runtime. Thank you for all of your support, feedback, and patience as we got this done. What does it mean for you? Your apps will more reliably detect and report errors.You can write blank/null values to a database.You can detect and replace errors with the IsError, IsErrorOrBlank, and IfError functions.You can control error reporting and logging at a central location with App.OnError.You can create and throw your own custom errors with the Error function. Error handling is a big change in behavior. By entering preview, we are signaling that we believe we are done, that we anticipate no further significant changes from here. Many of you already use error handling in production and this move to preview should only embolden more of you to do so. If significant changes are needed from here, we will treat them as a separate feature. We are rolling this out slowly as it is such a big change. All of you will soon see that the Formula-level error handling switch has moved from experimental to preview in the settings (as of version 3.22082). It will still be default to off for most tenants. Over the coming weeks we will slowly change the default for new apps only to on across the tenants. Makers can still disable this feature and will be able to do so for a long time. I say again: we are changing the default for new apps only. Existing apps will continue running as they always have. We have no plans at this time to turn this on for existing apps, and as this is such a big change, we may never do this and make this a permanently available switch. Your feedback will guide us. The documentation for Error, IfError, IsError, IsErrorOrBlank functions and the App.OnError property covers these changes. IfError and IsError are very similar to their Excel counterparts. We are also working on overview docs that will be released shortly. But before that, let’s take a brief tour. Let’s start with what Excel does, the inspiration for Power Fx. For an error like division by zero, Excel is very clear that something has gone wrong with a # error message that shows right in the cell. This error will propagate to other cell formulas if A1 is used in a formula: Today, without error handling, Power Apps won’t report anything in this scenario, instead treating the division by zero error as a blank value. That’s not good, as the maker and the end user of the app have no idea something may have gone wrong: Errors happen. Unexpected data flows in, networks go down, storage fills up, to name just a few situations that an app may encounter in the real world. Makers don’t often think through all the ways that things can go sideways which makes default error handling even more important. Returning a blank for an error is also a problem because blank is a legitimate value in our type system and in many databases. Without error handling, Power Apps won’t allow you to write a blank to a database instead thinking it is an error. So, instead of returning an easy to ignore or misinterpret blank value, with error handling turned on we now report an error to the end user (the error banner) and show the formula as having an error to the maker (the red filled in circle on the control): Further, if you look at the value of the formula, it is not a blank but an error value. Just as any formula can result in a blank, now any formula can also result in an error: Now, we still aren’t showing an error in the label control itself as Excel does. We couldn’t do this generically because, unlike Excel, the error could be on a property of a control for which there is no way to display the error. For example, where should an error on a slider control? Where should an error be shown for an imperative operation in the middle of a button’s OnSelect formula? We settled on showing the end user banner and flagging the control in the design experience. That’s not to say you can’t detect and display an error in that label control. Error handling provides a wealth of mechanisms to control how errors are handled and reported. For example in this case, we can wrap the division by zero with an IfError function to return a custom message in the label: The Text function call is required for type compatibility. Or we can use IfError to throw a different, more specific error with the Error function: Or we can have a catchall for all errors in the app with App.OnError. For example, we can log the error and present a different message to the end user: If we look at the log, we see the details of the captured error from FirstError (and there is also an AllErrors), including where it happened and when it was detected: The possibilities are endless! You now have all the tools you need to detect, replace, report, and log errors, including a good default behavior if you never take advantage of these tools. And, bonus, you can also now write blank (or null) values to databases. Please let us know what you think in the Power Apps community forum. There is a dedicated and active space for error handling discussions at Error Handling – Power Platform Community (microsoft.com).

New version of Power Platform Build Tools and a Feature packed update of Power Platform CLI

We are happy to announce a new version of the Power Platform Build Tools (Azure DevOps tasks) and our monthly update to Power Platform CLI. Read on for significant new features coming this month, including: Power Platform Build Tools: Now based on Power Platform CLI New CLI command to assign user New CLI command to automatically generate an App from an API definition New CLI command to sync existing solution from an environment Read on for more details and other new capabilities. Power Platform Build Tools v2.0 Our new version of the Power Platform Build Tools is built on top of the Power Platform CLI, whereas the previous version was based on PowerShell. By aligning these tasks to be based on Power Platform CLI, we can now maintain the same delivery rate of new features as we do with GitHub actions and based on several internal tests with customers these tasks run at 20% to 25% faster than the older version. We had several internal teams try out and use these pipelines. The ALM Accelerator for Power Platform, built by our Power CAT team, was an early adopter of this “re-platforming” effort. As most of us know, the ALM Accelerator is a Power App, that has flows, Connection References, and exercises many of the components of the Power Platform. It’s also used to automate the ALM of the tools the Power CAT team build like the CoE Starter Kit and the Creator Kit.  The Power CAT team has a complex setup, with multiple environments, and pipelines comprised of 40+ yaml files. Each pipeline contains up to 30 tasks and even in this complex setup, we saw a significant impact on the pipeline performance with the new version of the Build Tools. The next monthly release of the ALM Accelerator will be upgraded to the v2.0 tasks, so all customers using the ALM Accelerator who upgrade to the next release will benefit from this. Figure 1: ALM Accelerator setup for deployment using Power Platform Build Tools v2.0 How do you know which version of the task you are using? When creating your pipeline using the pipeline edit make sure to have the following selections in place to use PAC CLI version. Below is an example from my developer instance: Figure 2: Task version selection in Azure DevOps between Power Platform CLI version versus the PowerShell version Once you select a version of the Power Platform Build Tools tasks you cannot mix and match, as the pipeline will not run, as in you cannot have the installer be a different version and the solution import use the PowerShell version. If you do not want to use the Azure DevOps task editor to change the version, you can use the YAML editor in Azure DevOps and change the version number from 0 to 2 Figure 3: Find and replace the version of the task to be used To learn how to edit the yaml files in Azure DevOps, please follow the instructions here. When using Power Platform Build Tools version 2, you will notice that it is also cross platform and can run on both windows and Linux runners in Azure DevOps. Package Deploy task will not work Linux agents and will require windows runners New capabilities in the July Refresh for the Power Platform CLI We are happy to announce an abundance of new features with the July refresh of the Power platform CLI. From cross-platform support perspective, the Power Platform CLI now runs on .NET 6 and uses the generally available version of the Dataverse Service Client (1.0.9). That is just what is under the hood of the command line, but there is more … Changes in the Admin sub command of Power Platform CLI We have introduced a new sub command for pac admin, and it is: Assign-user The assign user capability is one of the most requested features, in the past when an environment was created via a pipeline or via the command line from a service principal account then the newly created environment would be owned by the service principal account. Now you can assign a user to the target environment, so that when solutions that have flows that a particular user owns need to be active, well now that is possible, they will be. The sequence of events would be as follows: Figure 4: Sequence of events in Azure DevOps for assigning user The command line equivalent looks like this Figure 5: pac cli command line for assign user Changes in the auth create command In the last update we started down the path of single sign-on by providing something called the universal auth profile. You can still create admin and dataverse profiles, but those are deprecated now. With the universal auth profile, if your account has admin functions, you can create environments and run other administrative functions in addition to creating solutions etc. In the July update, we have now introduced creating a universal profile against a selected environment by providing –environment, we did this because when you created the universal single sign-on profile, it would create access to your default environment, now with the –environment flag you can change it. Figure 6: when creating universal auth profile it defaults to the default environment Figure 7: creating a universal profile against the selected environment pac auth update The new pac update command now provides the ability to change properties of your authentication profiles. Before you could create an auth profile and select different auth profiles. Now you can rename existing auth profiles including the environment to which the auth profile is associated with. Figure 8: Update authentication property New Command: pac canvas create This is a new command developed from the Power Apps team and contributed to the Power Platform CLI. This new capability allows you to generate an App from an API definition. Pro developers who build Azure Functions or other web APIs can create a custom connector that points to the API, and then use the canvas create command to generate a functional app. The generated app can be used to interact with or validate the API. In fusion teams, a pro developer can run the command to generate the app and then hand it off to a low-code maker to make further customizations in Studio. The generated app will feature a screen for GET and POST actions defined in the custom connector, control layout that is tailored to the input and output types defined in the actions, and auto-generated Power Fx code for interacting with the custom connector. Figure 9: pac canvas create command Updates in the org commands Within the pac org commands we now support selecting a particular org and then support filtering with the list command. Figure 11: The usual pac org list command And now with the filter command And instead of doing and pac auth update, you can now just do a pac org select and change the environment url for the current authentication profile Figure 12: changing the org for the current auth profile Updates in the solution command pac solution sync (preview) this new command (in-preview) is a handy one, especially if you use pac solution clone like me, has it ever happened that you had cloned a solution from your developer environment, and were working on a PowerFx regular expression and only to realize another team mate of yours changed a different screen in the maker studio while you were editing a regular expression, in the past you had to re-clone your solution and then make sure to reintroduce your changes. Now with pac solution sync you don’t have to do that anymore with sync you just get the delta, and you can continue building your own PowerFx regular expression. We have also increased the timeout period to 1 hour for pac solution check, the user community demanded this, and we were incredibly happy to oblige. You can also add a solution component to an unmanaged solution on disk with the command pac solution add-solution-component Updates for packages and plugin development The package command now supports the ability to add F&O packages for deployment with the parameter add-external-package pac plugin push now provides the ability to push updates to an already registered plugin. Updated Power Platform CLI documentation Documentation for Power Platform CLI has also been updated with these new commands and parameters that are being offered. Please check out the new reference page and provide us with feedback. Power Platform Conference in Orlando One last thing, we have the first ever in-person user conference happening in September for Power Platform Please register and if you are coming, we have several sessions happening for Code-first developers. Some sessions of interest are: Looking forward to seeing you there. So, even though we did not release the June refresh, we tried our best to make sure that we made up for it in July. As always, we are excited to bring these capabilities to you. If you have additional feedback, please reach out to us via the following forums ISVFeedback@Microsoft.com or The PowerUsers community. Raise the issue and bugs at the following location in GitHub https://aka.ms/powerplatform-vscode

Inline editing, modern browsing, and more with the new Power Apps grid control

Jason Green, Senior Program Manager, Thursday, August 11, 2022 We are excited to announce the public preview of the Power Apps grid control in model-driven apps! This represents the next evolution in grid experiences for model-driven apps, as this new modern grid control includes not only the accessibility and design enhancements from the modern read-only grid control but also boasts the following additional capabilities: Inline editing – While the Power Apps grid control can be used in read-only mode to let users view and open records in views and subgrids, this control also has an editable mode that enables users to make edits to records directly in the grid without having to navigate into a form first. Infinite scrolling – Users no longer need to explicitly move between discrete pages of data to browse through data. Instead, we are providing a modern browsing experience that allows users to scroll indefinitely through data until they find the record(s) they are interested in. While this behavior is enabled by default, makers do currently have the option to turn off this capability and have paging buttons instead. Customized cell renderers/editors – While this grid uses modern Microsoft Fluent controls to allow users to see and edit values in the grid, we recognize that some scenarios may have special needs that require modifications to the out-of-the-box visuals and user interactions. The Power Apps grid control allows a maker to make modifications to one or more columns via the “Customizer control” property. This is only the beginning! More capabilities are planned during the preview phase to bring the Power Apps grid to parity with the existing out-of-the-box read-only and editable grids, including support for grouping, nested grids, and client APIs. We look forward to hearing your feedback through the community post Power Apps grid control feedback.

Creating canvas apps as Dataverse solutions by default (preview)

We are excited to announce the public preview of canvas apps in Dataverse solutions by default. Solutions are used to transport apps and components from one environment to another or to apply a set of customizations to existing apps. A solution can contain one or more apps as well as other objects such as site maps, tables, processes, web resources, choices, flows, and more. A solution and its objects are stored in Microsoft Dataverse. Solutions are also the key mechanism for implementing application lifecycle management (ALM) in the Power Platform. For more information about solutions, see Solutions overview, and application lifecycle management (ALM) guide Unlike model-driven apps and most other objects, makers can optionally create their canvas apps outside of a solution and outside Dataverse. This can lead to unhealthy ALM practices, and create an overhead for DevOps teams and admins as they try to automate their ALM process. With this feature, environment admins will be able to set citizen makers and developers in a healthy ALM ready state from day one by enabling canvas apps as Dataverse solutions by default for one or more environments. Enable canvas apps creation as Dataverse  solutions by default  Canvas apps in solutions by default feature is disabled by default. However, environment admins can enable this feature by going to environment advanced settings, Product Settings, and toggle the feature “Create new canvas apps in Dataverse by default”  to “On” to enable the feature. Default behavior By default, this feature saves all canvas apps to the default solution named Common Data Services  (CDS) Default Solution published by Microsoft Dataverse Default Publisher (see below). As a best practice, we recommend that makers create their canvas apps in custom solutions or move canvas apps created from the default solution to a custom solution to facilitate the management of solutions and establish a common standard across all environments. As always, we would love to hear from you on how we could keep improving this feature. Please leave your feedback and comments on this post so that we can keep track of your comments and requests. For more information about adding canvas apps in solution by default, see Add canvas apps to solution by default (preview). See related: Manage feature settings in a Power Platform environment Implement healthy solution ALM with canvas apps in solution by default

PostgreSQL connector for the virtual network data gateway

We are happy to announce a new PostgreSQL connector for the virtual network data gateway! You can now connect to all your PostgreSQL workloads in the cloud using basic authentication. Just select PostgreSQL in the connection type dropdown menu...

Power BI August 2022 Feature Summary

Welcome to the August 2022 update. Can you imagine it’s the last month of summer already? We are excited to announce a variety of new features such as the conditional formatting for data labels, new “Select sensitivity label” dialog,...

Announcing improvements to Datamart Query editor

Datamarts in Power BI is a fully managed SQL database that allows users to easily perform relational database analytics using no-code/low-code. As you all know, we announced Public Preview of Datamarts during Build in May 2022. Since then, we...

About Me

464 POSTS
0 COMMENTS
- Advertisement -spot_img

Latest News

- Advertisement -spot_img