web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Extracting coordinates...
Power Apps
Answered

Extracting coordinates from AI Text Recognizer in a collection

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

so im working on an app to extract coordinates of text from the text recognizer and here's my code:

 

Set(X, TextRecognizer.Results);

ClearCollect(Cords,{});
Collect(Cords, {Values: X});

 

but this gives me a nested collection with all of it in an array and then box coordinates in another one. I want a tabular format where i get the text and left , height , top and width in seperate columns. Is there any way to do that as i wanna import it to excel using

Toexcel.Run(JSON(Cords,JSONFormat.IncludeBinaryData))

 

which works but its all in one cell.

for example i want the result to be:

 

TextLeftTopWidthHeight
a1234
b1234

 

Categories:
I have the same question (0)
  • Verified answer
    Antrod Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    It seems to work with this code:

    Set(X, TextRecognizer1.Results);
    Clear(CordsFinal);
    ForAll(X, Collect(CordsFinal, {Text: First(X.Text).Text, Left: First(X.BoundingBox).BoundingBox.Left, Top: First(X.BoundingBox).BoundingBox.Top, Width: First(X.BoundingBox).BoundingBox.Width, Height: First(X.BoundingBox).BoundingBox.Height}));
     
    Let us know if that helps!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 88

#2
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 45

Last 30 days Overall leaderboard