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 / Searching through data...
Power Automate
Answered

Searching through datatable to find value and then provide row number

(0) ShareShare
ReportReport
Posted on by 44

Hi all,

I have a datatable scraping from the web. The values change position depending on previous steps that are working fine. What I am looking to do is scrape the datatable to find "X" value and then send me back the row number. This is so I can then use that row number as a variable later in the flow. Please let me know if this is possible!

Thanks 🙂

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    You could turn the proper column into a list, and then use a loop to search on the list to report back the right row number, but this could take a while if you have a lot of rows.

  • Verified answer
    VJR Profile Picture
    7,635 on at

    Hi @JezAuditore 

     

    Use the Find action of the datatable

    VJR_0-1665457399988.png

     

    If you do not see this action in your list then you do not have the updated version of PAD.

  • JezAuditore Profile Picture
    44 on at

    I'll update thank you

  • JezAuditore Profile Picture
    44 on at

    @VJR , This has worked but it gives a row and a column saved in a variable, is there an easy way to extract just the row?

  • Verified answer
    VJR Profile Picture
    7,635 on at

    Yes, there is..

     

    If this is your DataTableMatches

    VJR_0-1665545318064.png

    Then %DataTableMatches[0]['Row']% will give you the direct value

     

    VJR_1-1665545363754.png

     

     

    Meaning: 

    The word FOUR was found on the 3rd row (starts from 0)

    VJR_2-1665545420511.png

     

     

    You can do a +1 to get the answer as 4th row

    %DataTableMatches[0]['Row'] + 1%

     

  • JezAuditore Profile Picture
    44 on at

    @VJR legend thank you

  • josephspengler Profile Picture
    123 on at

    @VJR  Great stuff.

     

    Taking it one step further, let's say I have a Column 3 in MyDataTable and I want to know that value.

     

    To get that, amusingly the +1 actually is important! Otherwise the result the the text '3'. In fact, if you want to get the actual row, it's easiest to use +0 to force it to be a number. (you could also add an extra step to convert text to number).

     

    So in your example table, to get the third column, from the table where to row contains FOUR the formula is:

     

    %DataFromWebPage[DataTableMatches[0][0] + 0][2]%

     

     

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 335 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard