cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
asafweis
Level: Powered On

How to find text in OCR output

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

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: How to find text in OCR output

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Super User
Super User

Re: How to find text in OCR output

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.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Community Support Team
Community Support Team

Re: How to find text in OCR output

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,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
asafweis
Level: Powered On

Re: How to find text in OCR output

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.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 51 members 3,398 guests
Please welcome our newest community members: