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 check a specifi...
Power Automate
Answered

how to check a specific value is exist in Datatable PAD?

(1) ShareShare
ReportReport
Posted on by 357

HI Team,

 

I want to check current item value is exist in DataTable or not if exist then skip the current transaction.

Thanks in advance!

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @Sanket1 

     

    You can use the below "Find or replace in data table" like below and find the required item is exists or not.

    If it exists you will get in the Datatablematches variable.

     

    Deenuji_0-1719847211892.png

     

     

     

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • NathanAlvares24 Profile Picture
    1,714 Moderator on at

    Hi @Sanket1 !

     

    Let me take an example.

    Say I have this data in one DataTable:

    NathanAlvares24_0-1719847074334.png

    And this is my flow:

    NathanAlvares24_1-1719847167156.png

     

    What this flow does is, that it will check for a specific value given by the user. Here it is given in variable, 'SearchValue'. If it matches, skip it by using "Next loop" action. If not, insert into another data table or basically do the rest of the necessary process.

     

    So basically if you want to skip a transaction which matches the condition, just use "Next loop" action.

     

    I hope this helps.

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @Sanket1 

     

    If we opt for "For each" or any other loop it takes more time if you pass large number of rows table than "Find or replace in data table" action.

     

    Please refer the below example for your understanding:

     

    My Data table:

    Deenuji_0-1719848962384.png

    Thought process:

    I selected my data table as the input table and chose 'find' as the search mode because I do not want to replace anything. Then, I specified "Alex" as the text to search for throughout the entire data table, which is why I mentioned it in the 'search by' field.

     

    Deenuji_1-1719849042032.png

     

    Output:

    It shows "Alex" found at 1st Row (First Row starts at 0th Index) and 0th Column.

    Deenuji_3-1719849285225.png

     

     

    In case if you want to search on any specific index or name then you can change "Search By" into "On column" 

    Deenuji_2-1719849226484.png

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

     

  • Sanket1 Profile Picture
    357 on at

    Thank you so much @Deenuji and @NathanAlvares24 
    let me apply in my flow then I will get back to you.

  • Sanket1 Profile Picture
    357 on at

    Hi @Deenuji and @NathanAlvares24 

    My workflow is like this

    1- read excel data 

    2- Filter it - dt_FilterEmpdata

     

    for each in dt_FilterEmpdata

    -----CurrentItem['Pan_Card'] 

     

    Set var - PanCardNo = CurrentItem['Pan_Card']

     

    now I am searching file[ 3 files in 3 folder]  and by using pan card number and merge it

     

    Every time [ loop]  i am writing another excel (ReportExcel ) that 

     

    this excel contain PanNo, EmpID, File A, FileB, FileC .

    _______________________________________________________________________________________________________________

     

    If somehow while running bot failed, When I again run the bot then  I want check PanNo is Exist in ReportExcel if exist then skip that transaction move to next loop( Transaction)

     

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @Sanket1 

     

    Follow the below steps:

    Deenuji_1-1719910784316.png

     

    Mt Data table looks like below:

    Deenuji_0-1719910754641.png

     

    Code:

     

    Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''C:\\Users\\deenu\\OneDrive\\Documents\\ConvertedCSVExcel.xlsx''' Visible: True ReadOnly: False Instance=> ExcelInstance
    Excel.ReadFromExcel.ReadAllCells Instance: ExcelInstance ReadAsText: False FirstLineIsHeader: False RangeValue=> ReportExcelTable
    LOOP FOREACH CurrentItem IN ReportExcelTable
     IF IsEmpty(CurrentItem['PanNo']) THEN
     # PAN No is empty so your logic goes here
     ELSE
     # You skip the loop and move to next transcation
     END
    END

     

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • Sanket1 Profile Picture
    357 on at

    i am looping through empData within that I want to check 

    This is my flow

    Sanket1_0-1719912499838.png

    CurrentItem is EmpData Excel That I want to check whether it is exist in reportExcel file(dt)

    Not separate

     

  • Sanket1 Profile Picture
    357 on at

    It would be great if you provide me the script which will check value is exist in DT, 
    If exist the store in var boolean value true or false

  • Verified answer
    CU16071609-1 Profile Picture
    6,255 Moderator on at

    @Sanket1 

     

    Please follow the below approach:

    Deenuji_1-1719914345873.png

     

    Find or replace in data table(Refine Search By as per your column index or name):

     

    Deenuji_2-1719914522849.png

     

    You will receive a flag indicating whether your PAN exists or not in the "Is_Exists" field.

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • Sanket1 Profile Picture
    357 on at

    Thank you so much @Deenuji 

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