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

Community site session details

Session Id : efszQ8STKtEKE6tbrif3eA
Power Apps - AI Builder
Answered

Extracting coordinates from AI Text Recognizer in a collection

Like (0) ShareShare
ReportReport
Posted on 19 May 2023 05:00:31 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:
  • Verified answer
    Antrod Profile Picture
    Moderator on 22 May 2023 at 10:52:26
    Re: Extracting coordinates from AI Text Recognizer in a collection

    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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete