Using Get Text to read text with new line

Hi Guys,

I am using the Get Text activity to read text from a text box in one of the Powerapps application. On Powerapps, the text value comes with new line

Ex: Item Code:123
Item Description:Laptop

When I use a string variable and use it in Type Into activity, the value comes like,
“Item Code:123Item Description:Laptop”

Is there a way that I can read value from Powerapps with new line?

Cheers!

@Asiri yessir you would split by environment.newline I believe. And then use the second instance in the new array.

You can add vbCrLf if you need to separate values in separate lines.
Ex. item1+vbCrLf+item2

1 Like

There is no newline read by the GetText activity.So split by environment.newline doesn’t work here.

@Asiri item1+Evnironment.NewLine+item2

Is there any activity that will also output the new line character as well? Get Text only read the text without the new line and Get full text did the same.Any other screen scrapping activities that I should try? If it returns the new line, then I can use environment.newline to split the string.

New line in Get Text is represented by vbLf. Try to replace it with something to test it.
Ex. myGetTextString.Replace(vbLf,“@”)

1 Like

I think everyone answering here is missing the point. The text is not scraping as displayed, it has nothing to do with adding new lines into the string.

I have the same issue, with CV Get text my text is coming out as a single line, ignoring all the new lines (despite these being separate elements according to CV). There is no setting I can see to force it to recognise these, and I cannot split my acquired string because there is no character present that I can split on.

I would like, and I think OP was the same, a method by which these text can be read but capture those newlines correctly. In my case I cannot change that source txt as they are invoices.

Thanks

So my case, this was my solution:

Get CV Text, but don’t output the text. Output the REGION.
Set clipping region with the previous region as input.
Get OCR Text with no selector and using UiPath Screen OCR - this gets everything, but with the clipping region set this is controlled, and this method does get the newlines.
Set clipping region back to default.