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

Notifications

Announcements

Community site session details

Community site session details

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

Extracting coordinates from AI Text Recognizer in a collection

(0) ShareShare
ReportReport
Posted on by

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
    Moderator 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard