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

Reading a specific entry in a variable or text file.

I have text I have extracted from a pdf. It is saved in a variable as

 

DSellerberg_0-1651186339586.png

DSellerberg_2-1651186495633.png

how do I get to and save to a new variable the contents of Line 2.

I have it also saved to a text file. But again how to I get to Line 2 and set it to its own variable.

 

1 ACCEPTED SOLUTION

Accepted Solutions
VJR
Super User
Super User

Assuming there is a newline in your strPDFText...

Use Split Text action and split by newline.

This will split into a datatable called TextList.

After splitting, %TextList[1]% will have your 2nd line (because it starts from 0).

Use Set variable to store it in the new variable you want.

 

Post back if you are facing any challenge. 

 

 

View solution in original post

2 REPLIES 2
VJR
Super User
Super User

Assuming there is a newline in your strPDFText...

Use Split Text action and split by newline.

This will split into a datatable called TextList.

After splitting, %TextList[1]% will have your 2nd line (because it starts from 0).

Use Set variable to store it in the new variable you want.

 

Post back if you are facing any challenge. 

 

 

DSellerberg
Frequent Visitor

Thank you, This did the trick.

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,676)