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 / how to compare list it...
Power Automate
Answered

how to compare list item value to datatable column

(3) ShareShare
ReportReport
Posted on by 67
hi all,
 
my use case - I have to compare if list item value is present in data table column name or not ......the column name position is not fixed in data table . How to do this in power automate desktop 
 
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    3,333 on at
    In Power Automate Desktop, you don’t need to worry about column position because you can reference columns by name.
     
    If the column name is known, use actions like “Filter Data Table” or “If Data Table contains value” to check if a list item exists.
     
    If the column name is not fixed, loop through rows and columns dynamically or extract the column into a list and use a contains check.
     
    This ensures reliable comparison regardless of column position.
  • Verified answer
    Valantis Profile Picture
    6,735 on at
     
    Since the column position isn't fixed, you need to check by column name rather than index. In Power Automate Desktop you can get all column names from a datatable using the datatable's Columns property, then check if your list item value exists in that collection.
    Here's the approach:
     
    1. Use a "Get column names from datatable" action or reference %YourDataTable.Columns% directly  this gives you a list of all column names
    2. Use an "If item in list" condition: check if %YourListItemValue% is in %YourDataTable.Columns%
     
    If PAD doesn't have a built-in datatable columns property in your version, the workaround is to loop through the first row of the datatable and check each cell's column header against your value using a For each loop with the datatable's column names.
     
    Can you share what version of PAD you're using and whether your list item is a text value you want to match against a column name, or a value inside a specific column? That will help narrow down the exact action to use.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard