web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Access second line of ...
Power Automate
Answered

Access second line of value in datarow

(0) ShareShare
ReportReport
Posted on by 170

Hello everyone,

 

I extracted some information from a website into a datatable. I then loop through that datatable with a for each and the second value of each 'CurrentItem' of that loop has 3 columns like this.

TelmoERF96_0-1698328671943.png

But for the second column with value #2 I have even more text there that shows once I click on it like this

TelmoERF96_1-1698328744642.png

 

I wanted to know how to access and get the text on the second line of the second column in this specific case. I have tried but I guess I just don't know the syntax for it.

 

If anyone could help I would really appreciate it, thanks in advance

 

Telmo Ferreira

I have the same question (0)
  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    This is a text string, and as such, it doesn't really have any properties that would allow accessing a specific row. In order to do what you need to do, you should use Split text on your %CurrentItem[1]% (or %CurrentItem['value #2']%). Split it using a new line as the delimiter. When you split it, the output will be a list. You can then get the second line as %TextList[1]%.

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

     

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • TelmoERF96 Profile Picture
    170 on at

    Thanks once again Agnius, that's exactly what I was looking for.

    I knew I had already accessed text like this just couldn't remember, thank you for your help.

  • TelmoERF96 Profile Picture
    170 on at

    Hello @Agnius,

     

    Sorry to bother you but I have a question kind of in the continuation of this problem you helped me with before.

    The problem I had before there were clearly 2 lines in the 'CurrentItem' since it was indicating the '1' and the '2' on the left.

    The problem now is that although I have text on different lines and still get the symbol to show more text

    TelmoERF96_0-1700240365157.png

    And when I expand the text it shows this way, with text in different lines despite only actually having one line. With the problem like this I can't use the solution you previously showed me.

    TelmoERF96_1-1700240514550.png

    Has this ever happened to you, or do you know how to solve it?

    Thank you and once again sorry for bothering you on a topic that was already solved

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    I am not quite sure what you are trying to say here. Seems to me the text clearly has more than one line. 

     

    If you're saying that it shouldn't, because you have already split it, then that is because you are looking at the wrong variable. You have your %CurrentItem%, which is a data row with the original data you extracted from the web page. If you used Split text on %CurrentItem['value #3']%, you should have stored the outputs of it in a separate variable, that should be a list of text rows.

     

    If the text in this column is not expected to have new lines, then check your extraction parameters. But I can clearly see there is not even 2, but 3 lines in there, with the second one being blank. It's like you're extracting two paragraphs.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • TelmoERF96 Profile Picture
    170 on at

    I'm sorry if I haven't explained myself properly @Agnius .

     

    The problem I am facing is that as you saw the variable clearly has more than one line, so with that being said I used the "Split text" action and split it when there is a new line.

    TelmoERF96_0-1700475427415.png

    But the output of that is still the same as it was before splitting, I get a list with one item that item being the same as before splitting.

    TelmoERF96_1-1700475577588.png

    Do you know what It could be the issue here? The source from where I am extracting is this website(https://www.afme.eu/news/views-from-afme) and this is how the extraction is being made

    TelmoERF96_2-1700477227808.png

     

    Any help would be appreciated, I was just trying to get all the lines together in the same line.

     

    Thank you for your time.

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Seems like it's not a new line, but something else. Maybe a carriage return or some other special character. Try using Replace text on it with regular expressions. Replace \r?\n? with something else that you could later use for splitting - something that would not be in the text, like triple semicolons: ;;;. Then use that in Split text as the delimiter.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • TelmoERF96 Profile Picture
    170 on at

    Thank you for your answer @Agnius but still that didn't work, the output didn't change at all, I don't understand why it doesn't recognize it as a new line.

     

    If you have any other idea of what could be, I would really appreciate it. Thanks again

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Try writing it to a plain text file and open it with a more advanced text editor, such as VScode or Notepad++ to see if there are some special non-printable characters that are present, but not visible to the eye. You can also do that by checking the page source or inspecting the element via the browser developer tools.

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

     

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 223

#2
David_MA Profile Picture

David_MA 195 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 167

Last 30 days Overall leaderboard