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 / How to find text in OC...
Power Apps
Answered

How to find text in OCR output

(0) ShareShare
ReportReport
Posted on by 181

Hi,

 

I'm making an app that searches an OCR result an confirms if a certain string is found within the text. I can get the OCR to work with Azure cognitive services easily engouht. What i can't work out is how to search the text for a string and output a true or false if the string is found within the text that is recognised. 

 

The string i am looking for is also dynamic and is held within a variable.

 

Can anyne help?

 

Thanks

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    Hi @asafweis 

     

    Have you explored using the Find function?  That is about the only function for searching a string for another string.

     

    I hope that helps you.

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @asafweis ,

    Could you please share a bit more about the result the OCP returns? Is it a Text string value?

    Further, do you want to check if a certain string is in a Text value?

     

    Based on the needs that you mentioned, I think the in operator could achieve your needs. I have made a test on my side, please take a try with the following formula:

    If(
     "Certain String" in "OCR Result",
     true,
     false
    )

    If you store the certain string you want to search for within a variable, please modify above formula as below:

    If(
     CertainStringVariable in "OCR Result", /* <-- "OCR Result" represents the Text value that (you mentioned) where you searach your certain string */
     true,
     false
    )

    In addition, I also agree with @RandyHayes 's thought almost, I think the Find() function could achieve your needs. Please take a try with the following formula:

    If(
    IsBlank(Find(CertainStringVariable, "OCR Result")),
    false,
    true
    )

    More details about Find function, please check the following article:

    Find function

     

    Best regards,

  • asafweis Profile Picture
    181 on at

    Thanks for the help. 

    I ended up using the find function and just looked for values above 0, but using 'in' looks just as valid.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard