Overview
In this article, we will talk about the new rolled-out functionality by Microsoft this year in Power Apps Ideas. We will talk about the “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.
So, let’s get started and explore this feature in detail!
Enable Preview Feature
Go to File menu, Open Settings, click on Upcoming features and make sure Ideas Panel is turned on!
Once we turn on the above feature, the Ideas Panel will be available for you!
Now, let’s explore this feature in detail!
Please take a look at the following Gallery control which is showing account information.
Now, we want to show the date as “June 3 2021”. Then how can we do that?
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.
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 the Power Fx formula.
Apply the formula and check the result.
Limitations
- Only available for the US region at this moment.
- Work with only Label control within Gallery
- Provide best results only for String and Date datatype at this moment
- Not worked on multiple columns
- Any calculations are not supported for numeric datatype
References
Conclusion
This is how the Power Apps Ideas feature works in Power Apps. Isn’t that cool? Happy Power Apping!!