October 21, 2021

Programming by Examples in Power Apps

Overview:

During this article, we will talk about new rolled out functionality by Microsoft this year in Power Apps Ideas. We will talk about “Programming by Examples” feature in detail. So, Let’s get started!

What do we mean by Programming by Examples?

“Programming by Examples” is a new AI Driven capability in Power Apps Ideas that automatically generate Power Fx Formula for us. This new feature is powered by PROSE (Programming by Examples and Natural Language), researched and developed by the Microsoft PROSE team. 
The same technology is already used in other Microsoft products as well, e.g., Flash fill in Excel, Intellicode suggestions in Visual Studio, and Table extraction in Power Query, etc.

Note:  At this moment, it is only available for US Region. 

Enable Preview Feature:

Go to File menu, Open Settings, click on Upcoming Features and make sure Ideas Panel is turn on!
Once we turn on the above feature, the Ideas Panel will be available for you!

  1. Please take a look at the following Gallery control which is showing account information.
  2. Now, we want to show the date as “June 3 2021”. Then how can we do that?
  3. The above example output generated the Power Fx formula automatically. Select the formula and check the result. It will show you the following result!
So, this is how we can apply “Programming By Examples” in Power Apps. 

Let’s check some more examples:

Apply PBE on Text Columns:

  • We want only First name from Full name. Then just provide your expected output and the formula will be generated automatically. 
  • Below is the end outcome!

Apply PBE on Date column by Training the example:

  • We want to display the Month name in 3 characters. So, how can we do that?
  • Select Label, click on “Train from Examples’
  • Provide sample outcome for few fields and click on “Get Ideas”.
  • This will generate Power Fx formula
  • Apply the formula and check the result.

Conclusion:

This is how Power Apps Ideas feature works in Power Apps. Isn’t that cool? Happy Power Apping!!

If you have any questions you can reach out our SharePoint Consulting team here.

No comments:

Post a Comment