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

String splitting doesnt do anything

Greetings,

 

In my flow I take text from a scanned invoice using the micrsosoft Vision API. Then I would like to take the invoice number out of the text by splitting the text everywhere where it says "\n", feed that to a string array and then search for the invoicenumber by going through the array using a for each loop.

Though somehow the split doesnt do anything. The String looks exactly the same before and after the operation.

This is the code of the split in a set variable action:

 

split(body('Optical_Character_Recognition_(OCR)_to_Text')?['text'],'\')
 
Does anybody have a clue why this doesnt work?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Splush
Level: Powered On

Re: String splitting doesnt do anything

Okay,

 

I was not expecting to find a solution this early, but the trick is to initialize a new variable and just press the enter key in the corresponding field. Then replace the '\' with that variable. Code is as follows:

 

split(body('Optical_Character_Recognition_(OCR)_to_Text')?['text'],variables('enter'))

View solution in original post

1 REPLY 1
Splush
Level: Powered On

Re: String splitting doesnt do anything

Okay,

 

I was not expecting to find a solution this early, but the trick is to initialize a new variable and just press the enter key in the corresponding field. Then replace the '\' with that variable. Code is as follows:

 

split(body('Optical_Character_Recognition_(OCR)_to_Text')?['text'],variables('enter'))

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 307 members 5,830 guests
Recent signins:
Please welcome our newest community members: