Power FX…get back your power with excel like formulas… A brief review…

Microsoft Power Fx is an open-source programming language that hopes to make coding as straightforward as building a spreadsheet. Wondered why Microsoft is bringing this excel backbone language to Power Platform range of Products & Services.

It is planned to expand Power Fx throughout the Power Platform over the next two years, including model-driven Power Apps, Microsoft Dataverse and Power Virtual Agents, Microsoft’s low-code chatbot platform. Developers will also be able to use it to directly edit apps in text editors like Visual Studio Code.

So Power Fx is the new name for the formula language for canvas apps. It’s a general-purpose, strong-typed, declarative, and functional programming language. Power Fx will be made available as open-source software. And source code can be found at this link..

When a formula is modified or a value is entered, the worksheet is immediately recalculated to reflect the changes. 

Let’s look more in-depth at all the things that Power Fx is doing for us and the freedom it has to optimize because the formula was declarative:

  • Asynchronous: All data operations in Power Fx are asynchronous. The maker doesn’t need to specify this, nor does the maker need to synchronize operations after the call is over. The maker doesn’t need to be aware of this concept at all, they don’t need to know what a promise or lambda function is.
  • Local and remote: Power Fx uses the same syntax and functions for data that’s local in-memory and remote in a database or service. The user need not think about this distinction. Power Fx automatically delegates what it can to the server, to process filters and sorts there more efficiently.
  • Relational data: Orders and Customers are two different tables, with a many-to-one relationship. The OData query requires an “$expand” with knowledge of the foreign key, similar to a Join in SQL. The formula has none of this; in fact, database keys are another concept the maker doesn’t need to know about. The maker can use simple dot notation to access the entire graph of relationships from a record.
  • Projection: When writing a query, many developers write select * from table, which brings back all the columns of data. Power Fx analyzes all the columns that are used through the entire app, even across formula dependencies. Projection is automatically optimized and, again, a maker doesn’t need to know what “projection” means.
  • Retrieve only what is needed: In this example, the LookUp function implies that only one record should be retrieved and that’s all that’s returned. If more records are requested by using the Filter function—for which thousands of records might qualify—only a single page of data is returned at a time, on the order of 100 records per page. The user must gesture through a gallery or data table to see more data, and it will automatically be brought in for them. The maker can reason about large sets of data without needing to think about limiting data requests to manageable chunks.
  • Runs only when needed: We defined a formula for the Text property of the label control. As the variable selected changes, the LookUp is automatically recalculated and the label is updated. The maker didn’t need to write an OnChange handler for Selection, and didn’t need to remember that this label is dependent upon it. This is declarative programming, as discussed earlier: the maker specified what they wanted to have in the label, not how or when it should be fetched. If this label isn’t visible because it’s on a screen that isn’t visible, or its Visible property is false, we can defer this calculation until the label is visible and effectively eliminate it if that rarely happens.
  • Excel syntax translation: Excel is used by many users, most of whom know that the ampersand (&) is used for string concatenation. JavaScript uses a plus sign (+), and other languages use a dot (.).
  • Display names and localizationFirst Name is used in the Power Fx formula while nwind_firstname is used in the JavaScript equivalent. In Microsoft Dataverse and SharePoint, there’s a display name for columns and tables in addition to a unique logical name. The display names are often much more user-friendly, as in this case, but they have another important quality in that they can be localized. If you have a multilingual team, each team member can see table and field names in their own language. In all use cases, Power Fx makes sure that the correct logical name is sent to the database automatically.

These no-code tools have been built to read and write Power Fx to ensure that there’s plenty of headroom for someone to take it further.

Now lets see what’s in there for developers here…

Professionals want to use professional tools to be most productive. Power Fx formulas can be stored in YAML source files, which are easy to edit with Visual Studio Code, Visual Studio, or any other text editor and enable Power Fx to be put under source control with GitHub, Azure DevOps, or any other source code control system. Take a look at below…

What a cool feature that Microsoft introduced all the excel functions and formulas to make low code apps. much easier ..if you want to further read regarding this…Microsoft Learn is the right place…this link can take you there…

Edit: 20/02/2022

Checkout the below image to see how power fx# reduces the length of code, a developer need to write…

That’s it for today…

Cheers,

PMDY

Power Platform..A trio..game changer…

Have u ever imagined that Microsoft will bring its all new diverse products covering Dynamics 365, Office 365 and standalone products under one roof making a Trio…to unlock the potential faster than you ever thought possible…if you were not aware…then this post is for you…

The main intention is to empower everyone with one connected app platform…Power Platform combines the robust power of PowerAppsPowerBI, and Microsoft Flow into one powerful business application platform –  providing quick and easy app building and data insights.

This is part one of 6 series blog posts helps you to understand the basics, in and out of this entire all new ecosystem. Upcoming blog posts will give you a deep insight on covering every individual aspect on this marvellous platform.

Power-platform-2

Common Data Model:

The Common Data Model (CDM) is the shared data language used by business and analytical applications. CDM bridges the gap between disjointed data repositories, granting easier cross-platform business reporting.

Copy-of-Copy-of-Common-data-service

It consists of a set of a standardised, extensible data schemas published by Microsoft and partners that enables consistency of data and its meaning across applications and business processes. This allows apps to integrate and share data with each other without the need for extensive, custom integration by providing a centralized point where systems can come together and connect.

The Common Data Model is a secure method for exposing Microsoft databases that allows developers to build custom connections with other databases.

Common Data service:

The heart of the Microsoft Power Platform is the Common Data Service for Apps(CDS). These applications handle your data through the use of Microsoft’s Common Data Service for Apps (CDS). CDS is a cloud-based tool hosted on Azure which allows you to securely store and manage your business data. Data within the CDS is stored within a set of entities, a standard set of entities are included, however custom entities can be created for specific requirements to your organization and populate them with data using Power Query. The CDS for Apps is built on the Common Data Model.

Dynamics 365 applications, like Dynamics 365 for Sales, Service or Talent also use the Common Data Service to store and secure data used by the applications. This enables you to build apps using PowerApps and the Common Data Service directly against your core business data already used within Dynamics 365 without the need for integration. You can think of Common Data service as a common store allows for an easier app building experience, and a single set of logic to maintain and operate over the data.

Power Apps:

Power Apps enables users fostering via No Code solutions which improves productivity and reduces the time for the delivery.

image15

PC Mag. had rated the power apps as the best low code solutions available in the market..if you haven’t gone through this..read this article..

PowerApps at its core is a Platform as a Service. It allows you to create Mobile Apps that run on Android, iOS, Windows (Modern Apps) – and with almost any Internet browser..Read more about Power Apps in the upcoming blog post here

Microsoft Flow:

Microsoft Flow is an online workflow service that automates actions across the most common apps and services and a trigger based system.microsoft-flow-templates

In total there are connectors for 323 applications and protocols at the time of writing, and you can write your own if you need a different one. You can read more about Flow and automating your business processes here…

Power BI:

Microsoft Power BI is a collection of software services, apps, and connectors that work together to turn your unrelated sources of data into coherent, visually immersive, and interactive insights. Power BI can be simple and fast, capable of creating quick insights from an Excel workbook or a local database.

sCM_Power-BI-Preview

At the users flexibility….we can use…Windows desktop application called Power BI Desktop, an online SaaS (Software as a Service) service called the Power BI service, and mobile Power BI apps that are available on Windows phones and tablets, and also on Apple iOS and Google Android devices.

These three elements—Desktop, the service, and Mobile apps—are designed to let people create, share, and consume business insights in the way that serves them, or their role, most effectively.

Read more capabilities of Power BI here…

Connectors & Gateways:

Nevertheless we discussed all the other components as part of this framework, connectors and gateways plays a major role…Connectors are essentially proxy wrappers around the APIs provided by services that allow Microsoft Flow, PowerApps and Logic Apps to easily interact with the service. You can read more about connectors and gateways and much more in upcoming post…

That’s it for today…thank you for reading…

Cheers,

PMDY