Build a Power Apps application that uses AI Builder Text recognition
Your task for this exercise is to take a picture, or upload an existing one from the file system, and then retrieve text lines that are present in the image. Then, you build a Power Apps canvas app and use the Text recognizer component, which can be useful for assisted data entry. For more information, see the What are canvas apps in Power Apps and Use the Text recognizer component articles in Power Apps documentation.
Create an application in Power Apps
To create an application in Power Apps, follow these steps:
Select + Create in the Power Apps menu.
Select + Blank app.
Select Blank canvas app.
Select Create.
Name the canvas app Contoso Text Recognizer.
Select Phone.
Select Create
Your next task is to give users the ability to automatically retrieve the text lines that are visible in the image.
From + Insert > AI Builder, select Text recognizer (preview). This control allows you to take or upload a picture and automatically recognizes the container identifier.
Resize the control to fit in the screen.
Show results of model’s extracted information
To show results of model’s extracted information, follow these steps:
Select Insert Text label
Select Label1 and type TextRecognizer1.Selected.Text in the Formula Bar
Select Run
This displays the text that was manually selected by the user from the list of texts that were recognized by AI Builder.
To analyze an image, select + New image and then select an image from your device. You can also take a picture with your mobile device.
AI Builder Text recognition now processes the image and displays the recognized text in blue bounding boxes. You can also manually select a bounding box with your mouse on a computer or by tapping directly on a bounding box on a touch-enabled device.
Retrieve the list of all text lines and display it to the user
To retrieve the list of all text lines that are present in the image and then display it to the user.
This change binds the list of recognized text lines to the data table.
Select + Insert and Type Data table, Select Data table (preview)
Select DataTable1 and type TextRecognizer1.Results.Text in the Formula Bar
On the right pane, select Edit Fields, select + Add field, Select Text, and select Add
All recognized text should be visible in the table beneath the image.
AI Builder Text recognition is able to recognize various printed character fonts and handwritten text.
You can use these results in many possible ways, such as saving it on your Microsoft Dataverse environment or other database with the help of connectors. For more information, see Show, edit, or add a record in a canvas app.