cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PrashantIyer
Frequent Visitor

Display a part of the text

Hello guys,

I have a field which displays the text from an image (OCR). Now, I want to split this text and auto populate multiple other fields. I am not able to use the split and the Left, Mid & Right functions since the number of characters present in the image are completely random. However, the text in these images do follow a specific format. For example, the text in an image would be of the following format :

1. Last Name

2. First Name

3. Date of birth

4. ....

........

I want to auto populate the last name in the first field, first name in the second field and so on. How do I only obtain the characters after the numbers (which could of be any random length) and tell powerapps to stop at the last character?

 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Hi @PrashantIyer 

 

good Q.  As we do split for each line, the same way you can split on "="

 

Substitute(Last(Split(LINEVALUE, "=")).Result, """","")

 

You can use substitute to remove any other chars. I just removed double quote ".

 

Thanks.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @PrashantIyer 

 

Considering the OCR text has data in multiple line, you can try as follow:

 

  1. declare variables which match the Labels of the text you need
  2. split the OCR text by lines
  3. Filter the result of #2 with variable to get the match of required label
  4. Use substitute to the result in #3 with blank Substitute(linevalue, variable from #1, ""), this give you the value 

 

Thanks.

Hi @Anonymous ,

Thanks. But how do I split the lines of the text? Each line could contain multiple words. For example, Last name = "Robert Adams".

Anonymous
Not applicable

Hi @PrashantIyer 

 

good Q.  As we do split for each line, the same way you can split on "="

 

Substitute(Last(Split(LINEVALUE, "=")).Result, """","")

 

You can use substitute to remove any other chars. I just removed double quote ".

 

Thanks.

View solution in original post

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (29,794)