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 / Can't Split PAD DataTa...
Power Automate
Answered

Can't Split PAD DataTable into two other DataTables

(0) ShareShare
ReportReport
Posted on by 52

Hi folks, I have a scenario I'm stuck on and am asking for some help please.

Problem

  • I have 3 PAD Data Table variables: %BatchItems% %DataTableExclude% %DataTableInclude%.
  • %BatchItems% has records, the other two are empty by design.
  • I am struggling splitting the records from %BatchItems% into the other two tables.
  • The criteria for any record to be put into %DataTableExclude% is that any record that has Field1, Field2, AND Fiel3 set to empty string/null.
    • This is where I'm stuck.

Attempted

  • I'm trying to do this with either a "Run PowerShell Action" or a "Run .NET script" method, but have been unable to get either to work.
  • I couldn't think of a PAD native way to do it, but would love to be proven wrong.

 

Does anyone have any advice on how to tackle this?

I have the same question (0)
  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @user42 

     

    Could you please provide some screenshots of your Excel file with some example? It would be helpful to see how it looks before splitting and how you'd like it to appear after the split. If possible, include some sample values for clarification.

     
  • user42 Profile Picture
    52 on at

    Sure @Deenuji, here are some more details:

     

    The data comes from an HTTP-Request that is handled by a "Run PowerShell script" action.

    This works fine and populates the PAD DataTable variable %BatchItems%.

     

    Here is %BatchItems% populated after the HTTP-Request:

    :user42_1-1716406335735.png

     

    From there, I'm trying to split that data into the two PAD DataTable variables %DataTableInclude% and %DataTableExclude%.

     

    This is how they are created before I attempt to split the records.

    user42_2-1716406778198.png

     

  • Highboy Profile Picture
    1,187 Super User 2024 Season 1 on at

    Could a simple For Each not do it?
    If the three fields are empty, add the row to Exclude, otherwise add it to Include?
    I have used this method many times.

  • user42 Profile Picture
    52 on at

    Yes, that would work, but can be slower. I was trying to handle it via script to speed up the process.

  • Highboy Profile Picture
    1,187 Super User 2024 Season 1 on at

    How many rows are we talking about ?

  • Highboy Profile Picture
    1,187 Super User 2024 Season 1 on at

    Does the http request return all data in one go or is it possible to select what data you want?
    383 rows, are moved pretty quickly any way.

     

  • user42 Profile Picture
    52 on at

    @Highboy  300 or so rows are about average, but it needs to be near real time.

  • Verified answer
    user42 Profile Picture
    52 on at

    Thanks for the help guys, but I resolved the issue with my scripting attempts.

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
David_MA Profile Picture

David_MA 274 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 175

#3
Haque Profile Picture

Haque 166

Last 30 days Overall leaderboard